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?
#include <iostream>
using namespace std;
int main()
{
enum weekdays{sunday,monday,tuesday};
cout<<monday<<endl; // getting value as 1 as i expected.
enum class Weekday{sunday,monday,tuesday};
enum class Holiday{sunday,saturday};
Weekday wday=Weekday::monday;
cout<<Weekday::monday<<endl; // getting error
cout<<wday<<endl; //getting error
return 0;
}