title: c++ read input until the end of line char array
body: <p>I'm trying to make my code work, actually it works but not that well. The code stops after 'enter' appeared. I want to make my code work until the end of file input from user.   </p>
  
  <pre><code> #include&lt;iostream&gt;
  using namespace std;
  
  int main(){
      char input[2000];
  
  
      cin.getline(input, sizeof(input));
  
      int lol = strlen(input);
      int boing = 0;
      for (int p = 0; p &lt; lol; p++)
      {
  
          if (input[p] == '\"')
          {
              boing++;
              if (boing % 2 == 1)
              {
                  cout &lt;&lt; '\`'&lt;&lt;'\`';
              }
              if (boing % 2 == 0)
              {
                  cout &lt;&lt; '\''&lt;&lt;'\'';
              }
          }
          else
              cout &lt;&lt; input[p];
      }
  
      system("pause");
  }
  </code></pre>
  
  <p>if we enter input these words </p>
  
  <blockquote>
    <p>Is branched in ""my up strictly "remember. "
    Songs but chief has ham widow downs. Genius or so up vanity cannot. 
    '''```Large do tried <code>goi"'</code>''ng" about water defer by. "Silent" son man she wished mother. 
    Distrusts allowance do knowledge eagerness assurance additions to. 
    We """"diminution preference "thoroughly if. "Joy deal pain ';`392view" much her time. Led young gay would now state." </p>
  </blockquote>
  
  <p>my output become</p>
  
  <blockquote>
    <p>Is branched in <code>''my up strictly</code>remember. ''</p>
  </blockquote>
  
  <p>but it should be </p>
  
  <blockquote>
    <p>Is branched in <code>''my up strictly</code>remember. '' Songs but chief has
    ham widow downs. Genius or so up vanity cannot.  '''```Large do tried
    <code>goi</code>'<code>''ng'' about water defer by.</code>Silent'' son man she wished
    mother.  Distrusts allowance do knowledge eagerness assurance
    additions to.  We <code>''</code>''diminution preference <code>thoroughly if. ''Joy
    deal pain ';`392view</code> much her time. Led young gay would now state.''</p>
  </blockquote>