Hi all,
class A
{
public:
A();
~A();
}
class B
{
public:
B();
~B();
private:
A *a; ->declares a pointer to class A object
A a; -> holds the class A object
}
Whats the difference between the 2 type of declaration of a class A instance? Are there any rules as to when to use pointer and when to use just object?
Please advise.
Cheers!