Basic Destructors and Multi Inheritance

I have created 3 classes that all need to inherit from one another and print out the following :
Destructor of classA
Destructor of classC
Destructor of classB

However I am strugling with the multi inheritance part and I am not entirely sure about the format.Heres what I have so far;


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//CLASS A.cpp

classA::classA()
{
}

classA::~classA()
{
	cout << "Destructor of classA" << endl;
}

classC::classC()
{
}

classC::~classC()
{
	cout << "Destructor of classC" << endl;
}

classB::classB()
{
}

classB::~classB()
{
	cout << "Destructor of classB" << endl;
}


And then my header files
1
2
3
4
5
6
7
8
using namespace std;

class classA
{
	public:
		classA();
		~classA();
};


And so on for the rest of them. I know i have to implement the multi inheritance in the header file but how? And themn would the .cpp file have to change? Thank you
Last edited on
Ok solved it myself.
Topic archived. No new replies allowed.