4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by WaltP
0

What code do you have so far?
What did you try?
What is your hold function supposed to do?
What is it about this hold function that you don't know how to do or can't seem to make to work?
...

>>can anyone help me?
We can answer questions or help you solve a problem, but first, you have to describe the problem, ask a relevant question, and show that you have put effort into solving the problem yourself. Answering the questions above is probably a good way to do that.

0

Some terms to google, function pointers and arrays. Basically, create a typedef of a function pointer, and create an array of that alias.

0
void prompts()
{
	gotoxy(42,8);
	cout << "Type your name: ";
	getline(cin,name);
	gotoxy(17,29);
	cout << "Do you want to re-roll? (y/n) ";
	cin >> rollAgain;
	if (rollAgain != 'y')
	{
		gotoxy(17,29);
		cout << "Do you want to save any numbers? (y/n) ";
		cin >> savenum;
		if (savenum != 'y')
		{
			gotoxy(0,28);
			EndofTurn();
		}
		else if (savenum == 'y')
		{
			gotoxy(17,29);
			cout << "What die do you want to save?";
			cin >> Hold[0];
		}
	}
}

Hold[5] is my array. How can I make it to check if the number is held and stored inside the array? I need this for my score function

0

i also need a code for deleting a single line by clearing it out and replacing it with the next gotoxy

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.