Can someone help me solve this error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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
24th Apr 2020, 6:11 PM
MO ELomari
+ 2
thank you so much
24th Apr 2020, 7:35 PM
Muhammad Abdullah
Muhammad Abdullah - avatar