I have a doubt regarding forwarding declaration. in .h file: class B; class A{ void func(B* tap); } in .cpp file void A::func(B* tap){ tmpo=tap->par1; } does the above code snipet correct if not whats the problem. Please be descriptive.
In .cpp file I assume you have included the .h file and if that is true its correct but then tmpo and other variables are in doubt
You need have to include the .h file for declaration for class A in the file where "class B" declaration is there. Apart from that tempo is what here?
I got my doubt clear. I have to include B.h file in A.cpp file as earlier i was in a doubt since i already had made forward declaration of B in A's header file. tempo is nothing imp. here....just a part of rough-code. btw, thanks 4 clearing my doubt.