-
April 13th, 2009, 09:15 PM
#1
Constant array question? (Begginers question)
Hey all, just for fun I'm designing a game that is similar to Yahtzee. In order to store the values of the players rolls, I'm envisioning an integer array something like:
int roll_value[10];
Where roll_value[0] could be the value of a "two of a kind" roll and roll_value[1] could be the value of a "three of a kind" roll.
I've hit a conceptual roadblock. Once the value of the roll_value array has been declared, how can I ensure that the player cannot put any further values into that element? Would const do the trick somehow?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|