title: Why is int x = int(5) legal if int is not a class?
body: <p>From what I understand it is legal to instantiate an integer in c++ like this:</p>
  
  <pre><code>int x = int(5);
  </code></pre>
  
  <p>As a Java programmer I would assume that this line of code calls the constructor of the integer passing "5" as an argument. I read though that int is not a class and thus has no constructor.</p>
  
  <p>So, what does exactly happen in that line of code and what is the fundamental difference between initialising the int that way and this way:</p>
  
  <pre><code>int x = 5;
  </code></pre>
  
  <p>Thanks in advance!</p>