Today, I faced very weird problem. I have 2 classes say class A and B. Both have one .h and .cpp files. 4 files(A.cpp,B.cpp,A.h,B.h). A class is base class of B and we are using instance of B in class A. It was saying "not a type" error while compiling. How can I solve the error? Google was saying "it is a kind of cyclic dependency" in the code that's why it was giving error. Please help. Thanks.