#include <iostream>

using namespace std;

class myBase
{
public:
  void show(void) {cout << basevalue << endl;}
protected:
  myBase(void) {basevalue=5;} // protected constructor
  myBase(long bv) {basevalue=bv;} // protected constructor
private:
  long basevalue;
};


class myDerived : public myBase
{
public:
  myDerived(void) : myBase(42) // default constructor
  {
    derivedvalue=3;
  }
  void laatzien(void)
  {
    cout << derivedvalue << endl;
  }
private:
  long derivedvalue;
};


int main()
{
myDerived md;

  /*
   * myBase is abstract base class, daar kun je geen objecten van maken
   */

  // myBase mb; // mag niet want default constructor is protected
  // myBase mb(33); // mag niet want constructor is protected

  md.show(); // roep functie uit base aan
  md.laatzien();
} // main()

