title: c++ Print an enum value
body: <p>I have the following code (it's actually longer, i'm just putting up the part that throws an error)</p>
  
  <pre><code>//Header class
  enum class Color{
      Rouge,  Bleu, Vert
  
  };  
  
  class Bike{
       Color _color;
       Bike (Color color): _color(color){
  }
  
  void print() const;
  }
  
  //Cpp file (assume all inclusions are done properly)
  void Bike::print() const{
   std::cout&lt;&lt;_color;
  }
  //Main
  main(){
      Color couleur (Color::Rouge);
      Bike obj(couleur);
      obj.print()
  
  
  } 
  </code></pre>
  
  <p>So everything else works perfectly until i print the color (<code>std::cout&lt;&lt;_color;</code>). I'm i using <code>enum</code> in the wrong way? why can't i print that color? </p>
  
  <p>error code </p>
  
  <pre><code>[Error] initializing argument 1 of 'std::basic_ostream&lt;_CharT, _Traits&gt;&amp; std::operator&lt;&lt;(std::basic_ostream&lt;_CharT, _Traits&gt;&amp;&amp;, const _Tp&amp;) [with _CharT = char; _Traits = std::char_traits&lt;char&gt;; _Tp = Color]'
  </code></pre>