title: Problems with getline() function?
body: <p>I have a problem with the <code>getline</code> function in the code below. In the "get" info section I want to be able to store a whole sentence, but I can't make it work. </p>
  
  <p>When I open up my program it just skips the input for the info.</p>
  
  <p>p.s: I'm new to C++</p>
  
  <p>Here is the section of the code where i have the problem (Enter the information):</p>
  
  <pre><code>void add() {
      string name;
      string faction;
      string classe;
      string race;
      string info;
  
      ofstream wowdatabase("wowdatabase.txt", ios::app);
      cout &lt;&lt; "Add a race or class" &lt;&lt; endl;
      cout &lt;&lt; "---------------------------------------------------------" &lt;&lt; endl;
      cout &lt;&lt; "" &lt;&lt; endl;
      cout &lt;&lt; "Enter the name of the race or class (only small letters!):" &lt;&lt; endl;
      cin &gt;&gt; name;
  
      cout &lt;&lt; "Enter Race (Type -, if writen in name section):" &lt;&lt; endl;
      cin &gt;&gt; race;
  
      cout &lt;&lt; "Enter Class (Type -, if writen in name section):" &lt;&lt; endl;
      cin &gt;&gt; classe;
  
      cout &lt;&lt; "Enter faction (Alliance/Horde):" &lt;&lt; endl;
      cin &gt;&gt; faction;
  
      cout &lt;&lt; "Enter the information:" &lt;&lt; endl;
      getline(cin, info);
  
      wowdatabase &lt;&lt; name &lt;&lt; ' ' &lt;&lt; faction &lt;&lt; ' ' &lt;&lt; classe &lt;&lt; ' ' &lt;&lt; race &lt;&lt; ' ' &lt;&lt; info &lt;&lt; endl;
      wowdatabase.close();
      system("CLS");
      main();
  }
  </code></pre>
  
  <p>Now it works fine =) but, when i want to output the info again it only shows the first word in the sentence? </p>