How do you store data when dealing with classes?

Im making a dice game, how do you store the data so that it can be incremented over time. Just give me example code.
1
2
3
4
5
6
class Dice()
{
short rollnumber[6];
public:
void getroll();
} diceC;
Last edited on
Fuck off, Catfish!

They asked for "classes" not global variables.
I personally think that "void getroll(...)" should either return a value or except a pointer\reference otherwise it's limited to only displaying the data within itself.
thankyou guys I will try the void getRoll method in a few hours, that sounds like it should work! Plus I used it before I think; I just forgot about it and didn't get to fully understand it before I stopped using it.
Topic archived. No new replies allowed.