What is the purpose of forward declaration?
what is the description or meaning of this: for example: class test; class test { ..... }; C++ (like C) was designed to be implementable by a single-pass compiler. Forward references are necessary in cases where the compiler needs to know that a symbol refers to a class before the class is actually defined. The classic example of this is when two classes need to contain pointers to each other. i.e. class B; class A { B* b; }; class B { A* a; }; Without the forward reference to B, the compiler could not successfully parse the definition for A and you can't fix the problem by putting the