title: C++ voting program help (beginner)!
body: <p>Im new at cpp and i try to train myself with a little voting program.
  You give in the parties and then the votes of the party.</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;string&gt;
  
  using namespace std;
  
  int main()
  {
      string sInput = " ";
      string sName1 = " ";
      string sName2 = " ";
      int iParty1 = 0;
      int iParty2 = 0;
  
      cout &lt;&lt; "Name of the first party: ";
      cin &gt;&gt; sName1;
      cout &lt;&lt; "Name of the second party: ";
      cin &gt;&gt; sName2;
  
      while (sInput != "")
      {
          cout &lt;&lt; "Your vote: ";
          cin &gt;&gt; sInput;
          cout &lt;&lt; endl;
          if (sInput == sName1)
          {
              iParty1++;
          }
          else
          {
              if (sInput == sName2)
              {
                  iParty2++;
              }
              else
              {
                  cout &lt;&lt; "Wrong Input" &lt;&lt; endl;
              }
          }
  
      }
      cout &lt;&lt; sName1 &lt;&lt; ": " &lt;&lt; iParty1 &lt;&lt; endl;
      cout &lt;&lt; sName2 &lt;&lt; ": " &lt;&lt; iParty2 &lt;&lt; endl;
      getchar();
      return 0;
  }
  </code></pre>
  
  <p>So you see the while loop. I want the program stop if i only press enter.
  But when i do it nothing happens. Why? Give me a clue!</p>