+ 3
What has possibly gone wrong?
enum{dead=0,alive}; struct Person { private: int state; public: Person(){state=alive;} //This gave no errors though... string name; string address; void kill(){state=dead;} ~Person(){} //This returns an error... };
5 odpowiedzi
+ 4
Please Help!!!
+ 3
Use class instead of struct. OOP concepts can be better learned and implemented using class
+ 3
@Dennis
Forgot that here...😅
+ 3
Thanks, everyone
+ 1
Try a semicolon after the struct :)