title: enum to unsigned int
body: <p>I have the following code:</p>
  
  <pre><code>class mph {
  public:
  enum minute_periods {five, ten, fifteen, thirty}; 
     std::vector&lt;minute_periods&gt; factors;
    minute_periods fac;
  
  void setUpFactors(void) { 
      factors.resize(4);
      factors[five] = 5;
      factors[ten] = 10;
      factors[fifteen] = 15;
      factors[thirty] = 30;
    }
  </code></pre>
  
  <p>and I get the following error:</p>
  
  <pre><code>error: invalid conversion from ‘int’ to ‘mph::minute_periods’
  </code></pre>
  
  <p>how do I fix it?</p>