0
I just started learning C++ yesterday am I doing this right?
It all works but something seems a little off about this, I'm still a noob though. https://code.sololearn.com/csI5BgO7W3xM/?ref=app
3 Respostas
+ 1
Seb TheS that is actually the worst answer you can give to someone. Just because it works, doesn't mean it's well written.
You could do pure virtual function for printAttributes, so every child would have to implement it. Then you could add every Mob child to polymorphic array and print all attributes in one "for" loop ^^
+ 2
You do right if the program does what is it supposed to do.
+ 1
Jakub Stasiak I don't know what the program is supposed to do.