title: String Input starting at start of a line and terminates with space
body: <p>How can i take string input in c++ like the following:
  begins at start of line and terminates at first space and ignores what is next to first space on that line and for second string goes to next line,
  input is from standard input </p>
  
  <p>example: </p>
  
  <pre><code>this is a sample input
  here are few lines
  looknospaces!
  </code></pre>
  
  <p>string array should conatin</p>
  
  <pre><code>string[0]=this
  string[1]=here
  string[2]=looknospaces!
  </code></pre>