title: Using Vectors with Qt
body: <p>I seem to be having an issue using basic vectors in Qt, where I keep getting a compile error. The exact information will be posted below:</p>
  
  <p>Code snippet:</p>
  
  <pre><code>....
  #include &lt;QVector&gt;
  #include &lt;QString&gt;
  
  QVector&lt;QString&gt; vector;
  vector.append("sometext");
  </code></pre>
  
  <p>Error message:</p>
  
  <pre><code>'vector' does not name a type
  </code></pre>
  
  <p>This error appears for any piece of code that directly pertains to the created vector, not just the append function. Any insight to what I am doing wrong would be appreciated. The vector exists. I've tested it by initializing all of it's elements using one item and accessing it in other parts of the program.</p>