class A { A a;//why can\'t we do this };
I take it you're coming from Java or something? A a will create a full instance of type A, which, well, contains A, which contains A, which contains A.
A a
A
You're probably thinking about this:
class A { A *a; // A pointer to A, not a full instance };