Hi,
I have this GameClass with 3 nested objects, and one object pointer. When I try to compile and access the BoardA object from main, I get an error message saying that 'class GameClass' has no member named 'BoardA'.
What am I doing wrong? The object pointer seems to work ok.
BoardA and Fleet are not members of the GameClass object. They are declared in the constructor which means they are not available outside the GameClass constructor is finished.
You have to declare and initialize them the same way you have done for Rules
Thank's smac =) Of course.. haha. I put it like that because I need to get the values as input for the Board and Fleet constructors. But I guess I have to find another way, and predefine the objects or something. I appreciate the help =)