Hey everyone. I am doing a program right now where scores from this void function
Code:
void ProcessOneGame(int& score1, int& score2 ){
bool GoodScoreCheck;
score1 = ReadScore("enter first score: ");
score2 = ReadScore("enter second score: ");
GoodScoreCheck= LegitScores(score1 , score2);
if (GoodScoreCheck == false)
{
cout << "Scores given are not legitimate." << endl;
GoodScoreCheck = LegitScores(score1 , score2);
}
}
have to get to this void function
Code:
void ProcessOneMatch(int& player1Matches,int& player1GamesWon,int& player1GamesLoss,
int& player2Matches, int& player2GamesWon,int& player2GamesLoss)
{
int score1 = 0, score2 = 0;
ProcessOneGame(score1 , score2);
player1Matches++;
player2Matches++;
}
the second function isn't complete yet but it is just supposed to get the scores back and see who lost and who one. Global variables can't be used and both have to be void functions. How would I do this?