Hello,
Can you please show me the error in this:
I get errors:Code:// header.h // each class have a function that takes a pointer to an object of the other class class c1{ void f1(c2* c2p); }; class c2{ void f2(c1* c1p); }; // implementation #include "header.h" void c1::f1(c2* c2p){ }; void c2::f2(c1* c1p){ }; //main void main(){ c1 ca; c2 cb; }
C2061: syntax error : identifier 'c2'
C2511: 'f1' : overloaded member function 'void (class c2 *)' not found in 'c1'
Thanks in advance.