@pnoid Is not declare your class, but create an object of type
Game
on the stack.
I know, I was going to say something more along those lines, but I figured it would be easier to understand if it was compared to standard data types since the syntax is the same in this case.
Another thing to mention is you should first avoid usingnamespace ... especially in header files and secondly there is no need to #include <iostream> since you do not use anything from that header.
Is there a reason why I don't want to put #includes in my headers files? or where you just pointing out that is was a waste because I wasn't using them?
I was pointing out it was a waste to include headers if you do not use them. Since in the first code you didn't have the string, but anyways all you really need is this