+ 1
Can someone help me solve this error?
https://code.sololearn.com/caE3eP269gvt/?ref=app https://code.sololearn.com/caE3eP269gvt/?ref=app https://code.sololearn.com/caE3eP269gvt/?ref=app
2 Answers
+ 2
the error you are getting is the result of using a forward declaration and then trying to call a method or access a member without providing the full declaration.( forward declaration only says that a particular class will be defined later )
so as far as the compiler is concerned you can't use any of them until "XYZ" is fully declared.
https://code.sololearn.com/ck51cd3dLwgJ/#cpp
+ 2
thank you so much