title: why does int myVar {5} give an error and not work?
body: <p>i am taking a c++ course and the instructor said to make variables like this:</p>
  <pre><code>int main() {
      int myVar {5};
      return 0;
  }
  </code></pre>
  <p>this gives me an error:
  &quot;expected &quot;;&quot; at the end of declaration&quot;</p>
  <p>what is wrong?</p>