title: why we cannot print the value of enum class as enum in c++
body: <p>Getting error while trying to print the enum class object. I am getting the error while trying to print this. where am I doing mistake?</p>
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
  
  enum weekdays{sunday,monday,tuesday};
  cout&lt;&lt;monday&lt;&lt;endl; // getting value as 1 as i expected.
  
  
  enum class Weekday{sunday,monday,tuesday};
  enum class Holiday{sunday,saturday};
  
  Weekday wday=Weekday::monday; 
  
  cout&lt;&lt;Weekday::monday&lt;&lt;endl; // getting error
  cout&lt;&lt;wday&lt;&lt;endl; //getting error
  return 0;
  }
  </code></pre>