#include <iostream>
using namespace std;
class Base
{
int m;
public:
Base()
{
cout << "Default constructor in base\n";
}
};
class Derived : public Base
{
int n;
public:
Derived()
{
cout << "Default constructor derived\n";
}
Derived(int i)
{
cout << "Parameterized constructor derived\n";
}
};
class Alarm{
public:
~Alarm();//destructor
};
int main()
{
Base z;
Derived x1;
Derived x2(4);
}
Comments
Leave a comment