title: What is the meaning of "if (x) { … }" where x is an integer in C++?
body: <p>I saw some c++ syntax that puzzled me</p>
  
  <pre><code>int x = 10;
  if(x){ //this line confused me
  //code 
  }
  else{
  //code 
  }
  </code></pre>
  
  <p>i don't understand how this is valid code, what does the <code>if(x)</code> do?</p>