i got errors and i cant find out what they meant i have went down the program line by line trying to figure them out and i am having no success. I am trying to use call by call values and parametrers n this program. (list of errors are below)
|error: at this point in file|
error: a function-definition is not allowed here before '{' token|
|error: too many arguments to function `int rand()'|
error: extraneous `int' ignored|
#include<iostream>
using namespace std;
v
oid score(int& ns1=0,int& ns2=2,int& ns3=3, int& ns4=4, int& ns5=5, int& n6=6, char gam_answ);
void display_score(int curr_score);
void roll_hold(int roll, int answer, int turn);
void turn_it_is();
void char play_again(char letter, char 'y', char 'n');
void int score(int& ns1, int& ns2, int&n s3, int& ns4, int& ns5, int& ns6, char gam_answ)
{
int turn;
while(char ns1=0)
{
cout << " next player " << ((turn % 2) ==1);
cout << " please select r for roll and h for hold ";
cin >> gam_answ;
gam_answ++;
}
}
void display_score(int curr_score)
{
int gam_answ;
curr_score = gam_answ++;
}
void roll_hold( char answer, int turn)
{
if(answer=='r')
{
do
{
(rand(turn)% (char& ns1=0,char& ns2=2,char& ns3=3, char& ns4=4, char& ns5=5, char& n6=6,)+1)));
}while(answer== 'r');
}
if (answer=='h')
{
do
{
system("pause");
}while (answer=='h');
}
void turn_it_is(int player1, int player2)
{ int ns1, ns2, ns3, ns4, ns5, ns6;
cout << (((turn_it_is%2)==1)?(player1:player2)<<
cout << " it's your turn ";
cin>> turn_it_is;
}
char play_again( char letter, char 'y', char 'n')
{
char 'y', 'n';
char letter ;
cout << " Would you like to play agian?( press y or n): ";
cin >> letter;
return letter;
}
i
nt main()
{
cout << "Race to 100 " << endl;
void score(char &ns1, char &ns2, char &ns3, char &ns4, char &ns5, char &ns6, char gam_answ);
void display_score(int curr_score);
void roll_hold(int roll, int answer, int turn);
void turn_it_is(int player1, int player2);
char play_again( char letter, char 'y', char 'n');
return 0;
}