title: expected primary-expression before 'else'
body: <p>I have an emergency here. This homework is due tomorrow for my CP 1 class. We have to make a simple dice game. If you get doubles of the same number, then good things happen. Here is the function:</p>
  
  <pre><code>void Doubles();       //prototype for the function Doubles()
  //pre: n/a
  //post: Plays a simple dice game with the user
  
  void Doubles()
  {
      //variables declared to store dice values
      int DieOne, DieTwo, PlayerSame, ComputerSame;
  
      cout&lt;&lt;"\nLET'S PLAY DOUBLES!!!\n"&lt;&lt;endl;
      srand ( time(NULL) );         //initialize random seed
  
      DieOne = rand()%6 + 1;
      DieTwo = rand()%6 + 1;
  
      cout&lt;&lt;"\nYour first die is a "&lt;&lt;DieOne;
      cout&lt;&lt;"\nYour second die is a "&lt;&lt;DieTwo;
      if(DieOne == DieTwo)
      {
         PlayerSame = 1;
      }
      else
      {
          PlayerSame = 0;
      }
  
      DieOne = rand()%6 + 1;
      DieTwo = rand()%6 + 1;
  
      cout&lt;&lt;"\n\nThe computer's first die is a "&lt;&lt;DieOne;
      cout&lt;&lt;"\nThe computer's second die is a "&lt;&lt;DieTwo;
      if(DieOne == DieTwo)
      {
          ComputerSame = 1;
      }
      else
      {
          ComputerSame = 0;
      }
  
      if(PlayerSame == 1 &amp;&amp; ComputerSame == 0)
      {
          cout&lt;&lt;"\n\nYou win! Your dice are the same and the "
              &lt;&lt;"computer's dice aren't!";
      }
          else if(PlayerSame == 1 &amp;&amp; ComputerSame == 1)
          {
              cout&lt;&lt;"\n\nYou tied! Your dice are the same and the "
                  &lt;&lt;"computer's dice are the same!";
          }
          else if(PlayerSame == 0 &amp;&amp; ComputerSame == 1)
          {
              cout&lt;&lt;"\n\nYou lost! Your dice are not the same, and the "
                  &lt;&lt;"computer's dice are!";
      else
      {
          cout&lt;&lt;"\n\nNeither you nor the computer had dice that matched, "
              &lt;&lt;"so you both lose!";
      }
  }
  </code></pre>
  
  <p>So why, wen I run this, am I getting the compiler error stated in the title? the primary expression is right there! The "else" it's referring to is the last one there. Any help is greatly appreciated.</p>