title: Read more than one word from string with sscanf
body: <p>I am trying to read formatted content from a file. To do so, I read line by line using <code>fgets()</code> and <code>sscanf()</code>. </p>
  
  <p>The content of the file is supposed to be a table. One row would look like the following example:</p>
  
  <pre><code>456    2    39    chained_words    62.5    // comment with more than one word
  </code></pre>
  
  <p>To read it, I use:</p>
  
  <pre><code>fgets(temp,MAXLINELENGTH,file);
  sscanf(temp,"%d %d %d %s %f // %s",&amp;num1,&amp;num2,&amp;num3,word,&amp;num4,comment);
  </code></pre>
  
  <p>It works fine with the first five elements plus the first word after the <code>//</code>, but the problem is that I need to store the whole comment in the <code>comment</code> char * variable. I have tried multiple solutions proposed in other posts, like specifying format that excludes certain characters, but nothing worked.</p>
  
  <p>I'd appreciate any hint to solve the problem!</p>