title: Compiler error: "Non-aggregates cannot be initialized with initializer list."
body: <p>When trying to create a simple vector in C++, I get the following error : </p>
  
  <blockquote>
    <p>Non-aggregates cannot be initialized with initializer list.</p>
  </blockquote>
  
  <p>The code I'm using is:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  int main(int argc, char *argv[])
  {
      vector &lt;int&gt; theVector = {1, 2, 3, 4, 5};
      cout &lt;&lt; theVector[0];
  }
  </code></pre>
  
  <p>I tried to put:</p>
  
  <pre><code>CONFIG += c++11 
  </code></pre>
  
  <p>into my <code>.pro</code> file, saved and rebuilt it. However, I still get the same error. I'm using what I assume to be Qt 5.5, here's what happens when I press <code>About</code> if it means anything to you: <a href="http://i.stack.imgur.com/1R9Bf.png" rel="noreferrer">Qt's About</a>. </p>
  
  <p>Any help is appreciated. </p>