title: error: invalid conversion from ‘int’ to enum c++
body: <p>I am getting "error: invalid conversion from ‘int’ to ‘num'" when i compile the below sample code in c++. Typecasting it with enum name doesn't help.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  typedef enum
  {
      NUM_ZERO = 0,
      NUM_ONE = 1,
      NUM_TWO = 2,
      NUM_THREE = 4
  } num;
  
  int main()
  {
      num* numFlag;
      *numFlag |= static_cast&lt;num&gt;(NUM_TWO);
      return 0;
  }
  </code></pre>
  
  <p>Please let me know if anyone knows how to resolve this.</p>