+ 1
Got troubles with inheritance syntax.
I can't derive the Daughter class from the Mother class. Need your help, guys. I've added two sepparate classes. BASE CLASS HEADER: #pragma once class Mother { public: Mother(); void sayHi(); ~Mother(); }; DERIVED CLASS HEADER: #pragma once class Daughter : public Mother //word Mother is undelined adn there is an error: "not a class or struct name" { public: Daughter(); ~Daughter(); }; What am I missing? Would appreciate any help.
4 ответов
+ 6
I don't think there is an mistake in your question.
+ 1
Do you have #include "mother.h" line in daughter header file, if you're using different files?
+ 1
@Esmira Muslija, silly me. It was so obvious. Thank you helping me!
0
You're welcome. :D