title: error: expected unqualified-id before 'if'
body: <p>I've googled this error until I'm blue in the face, but haven't been able to relate any of the results to my code.  This error seems to be caused, usually, but misplaced or missing braces, parents, etc.</p>
  
  <p>It's also been a long time since I wrote any C++, so there could be some obvious, foolish thing that I'm missing.</p>
  
  <p>This is a Qt Mobile app that I'm writing in <code>Qt Creator 2.4.0, Based on Qt 4.7.4 (64 bit) Built on Dec 20 2011 at 11:14:33</code>.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;QFile&gt;
  #include &lt;QString&gt;
  #include &lt;QTextStream&gt;
  #include &lt;QIODevice&gt;
  #include &lt;QStringList&gt;
  
  QFile file("words.txt");
  QStringList words;
  
  if( file.open( QIODevice::ReadOnly ) )
  {
      QTextStream t( &amp;file );
  
      while( !t.eof() ) {
          words &lt;&lt; t.readline();
      }
  
      file.close();
  }
  </code></pre>
  
  <p>What am I missing?  Thanks in advance.</p>