![]() |
| ||
| code help using dice std;<< moderator edit: added [code][/code] tags >> . Write the member function definitions for each function listed: 1. Object Type: a pair of dice Knows: The value of each face (1 – 6) Can Do: Roll for new face values Tell the value on each face. Initialize the die to have a value of 1 on each face. To roll the die, use the rand() function, to generate a random number. In order to generate a random number between 1 and 6, use the following: Number = rand() % 6 + 1; rand() is located in <cstdlib> |
| ||
| Re: code help As much as I want to help you, it looks like you want someone else to do your work for you. The code you've provided doesn't even come close to an attempt to solve the problem. It's asking you to write a Dice class that supports rolling the dice and giving the result. If you're having trouble with C++ at the fundamental level as your code suggests, you really need personal, face to face help instead of the clipped "this is your problem, here's how to fix it" help that you'd get here. And no, nobody is going to write this for you. |
| ||
| Re: code help Quote:
|
| All times are GMT -4. The time now is 12:08 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC