title: How to use C++11 in Qt creator 4.8
body: <p>I have looked everywhere and the <a href="https://woboq.com/blog/cpp11-in-qt5.html" rel="nofollow noreferrer">solution</a> to this is to add a line of code to a '.pro' file in my project. I cannot see any such files though! I can see a <em>qbs</em> file, the <em>main.cpp</em> file and a <em>xcode.qbs</em> file.</p>
  <p>This is how I started: using a Mac, I installed Qt Creator 4.8 (Clang v5.12) and I created a 'plain C++ project' which uses Qmake.</p>
  <p>I am using the {} to initialise a variable but it won't allow me to. I had a similar problem with Eclipse and found a solution. Any help, please?</p>
  <p>This is the code I am testing:</p>
  <pre><code>#include &lt;iostream&gt;
  
  int main()
   {
     int a{5};
     std::cout &lt;&lt; a;
     return 0;
    }
  </code></pre>
  <p>The error code for the line where I define <em>a</em> is:
  &quot;/Users/xxxxxx/Coding/HelloEarth/main.cpp:5: error: expected ';' at end of declaration&quot;</p>
  <p>What should I do?</p>