I need some help

So I have a doubt.

I have a class name Board which it's like the candy crush board, so it's a dynamic matrix.
Then I have a class named sugar with the color of the sugar
With the attributes: Sugar** a_t, int a_row; int a_col;

And they I have another class which is CurrentGame with the attributes:
Board *a_t;
int total_points;

So my question is how I can access to the class Board through the pointer a_t?
a_t[0].showBoard? And a_t[0] is the first row of the class Board?

thanks
Well, it must be pointing at something or be a dynamic array.
1
2
CurrentGame g;
g.a_t->a_row;    // This refers to the a_row member of class Board 
thank's for answering me,

but a_row is private
So you can't.
I was using a_row as an example. If you replace a_row with a public member than you'll have accessed the public member.

If this doesn't answer your question then I think you'll need to provide more details on what you're trying to access in the Board class. Posting the definition of the class would help.

Dave
Topic archived. No new replies allowed.