title: How to use reinterpret_cast in C++?
body: <p>I know the <strong>reinterpret_cast</strong> in C++ can be used in this way:</p>
  
  <pre><code>float a = 0;
  int b = *reinterpret_cast&lt;int*&gt;(&amp;a);
  </code></pre>
  
  <p>But why cannot cast it directly?</p>
  
  <pre><code>float a = 0;
  int b = reinterpret_cast&lt;int&gt;(a);
  
  error: invalid cast from type 'float' to type 'int'
  </code></pre>