84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
In the header file, the inherited base class always reports an error when compiling: expected class-name before '{' token
I feel this has nothing to do with inheritance, it’s just that you wrote the code wrong
It should be that your code is written wrong. You can post the code so that I can help you analyze it in detail
#ifndef MAN_H #define MAN_H #include "person.h" class Man :public person { public: Man(); void helpForOthers(); }; #endif//MAN_H int main() { return 0; }
This should be fine
I feel this has nothing to do with inheritance, it’s just that you wrote the code wrong
It should be that your code is written wrong. You can post the code so that I can help you analyze it in detail
This should be fine