I would like to take this oppertunity to say hi to everyone.
But I have a small problem I cant seem to work out. Its a simple dice program I created to try out the rand() feature but when I tell the program to roll again it does it twice.
do
{
roll_die();
cout << "Roll again? (y/n)";
no = getchar();
cout << endl;
}
while(no != 'n');
Just to make sure, this part says 'n' and not 'n'?
BTW: You are using C functions. You gotta get the following into your head: Anything that comes from C is evil (which is just a fancy way of saying, don't use it unless there is no reasonable alternative).
If you wonder why, the next character getchar eats is a '\n' for the enter the user entered. That's why you should avoid C functions if possible, you will only confuse yourself.