title: C++ functions won't return values
body: <pre><code>#include&lt;iostream&gt;
  #include&lt;cstdlib&gt;
  #include&lt;string&gt;
  #include&lt;time.h&gt;
  using namespace std;
  
  //Functions
  // player strategy
  int strategy(int user1Strat, int user2Strat);
  // player total score per round
  int currentScore();
  // Display game result
  void printResults();
  
  int main()
  {
      int total_player1 = 0; // player 1 current score
      int total_player2 = 0; // player 2 current score
      int player1_strat= 0;  //player 1 strategy for each turn
      int player2_strat = 0; // player 2 strategy for each turn
  
      // seed the random number generator.
      srand(static_cast&lt;int&gt; (time(NULL)));
  
      // get strategy for each player using functions &lt;strategy&gt;
  
      strategy(player1_strat, player2_strat);
  
      cout &lt;&lt; player1_strat &lt;&lt; endl &lt;&lt; player2_strat &lt;&lt; endl;
  
      system("pause");
      return 0;
  }
  
  int strategy(int user1Strat, int user2Strat)
  {
      int x,
          y;
  
      cout &lt;&lt; "Enter player1's roll until strategy: ";
      cin &gt;&gt; user1Strat;
      cout &lt;&lt; "Enter player2's roll until strategy: ";
      cin &gt;&gt; user2Strat;
      x = user1Strat;
      y = user2Strat;
  
      return x, y;
  }
  </code></pre>
  
  <p>While calling for function <code>strategy</code> in the function <code>main</code> it will execute how it should, but once I ask to return the value it will just return</p>
  
  <pre><code>Enter player1's roll until strategy: 10
  Enter player2's roll until strategy: 5
  
  0
  0
  
  press any key to contiue...
  </code></pre>
  
  <p>Does anyone know why this is happening or what is causing it, was my error in the strategy function? Or upon calling it?</p>