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.