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

23rd Apr 2019, 1:43 AM
ScriptingEngine
ScriptingEngine - avatar
3 Réponses
+ 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 ^^
23rd Apr 2019, 7:49 AM
Jakub Stasiak
Jakub Stasiak - avatar
+ 2
You do right if the program does what is it supposed to do.
23rd Apr 2019, 7:24 AM
Seb TheS
Seb TheS - avatar
+ 1
Jakub Stasiak I don't know what the program is supposed to do.
23rd Apr 2019, 7:54 AM
Seb TheS
Seb TheS - avatar