Thread: Void function to void function

  1. #1
    Registered User XNOViiCE's Avatar
    Join Date
    Nov 2012
    Location
    'merica
    Posts
    38

    Void function to void function

    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?

  2. #2
    Registered User XNOViiCE's Avatar
    Join Date
    Nov 2012
    Location
    'merica
    Posts
    38
    I see the supreme stupidity in my question. Never mind...*facepalm*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. difference between void and static void function
    By mahaju in forum C++ Programming
    Replies: 7
    Last Post: 12-27-2011, 04:02 AM
  2. Replies: 12
    Last Post: 03-27-2009, 02:36 PM
  3. Passing a variable in void to another void function
    By stevedawg85 in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2006, 06:17 PM
  4. void, void function
    By Furious_George in forum C++ Programming
    Replies: 4
    Last Post: 10-14-2003, 05:04 PM
  5. void non void function
    By modance in forum C Programming
    Replies: 6
    Last Post: 01-28-2003, 08:06 AM