How to put enum values to array of enum in c++?
Answers
Answered by
0
enum declration.
eg:
enum Tempurature
{
Low, Medium, High,
};
sample program
How to get int value from enum
enum Days
{
Sunday = 1,
TuesDay = 2,
wednesday=3
} //get value
int day = (int)Days.TuesDay;
eg:
enum Tempurature
{
Low, Medium, High,
};
sample program
How to get int value from enum
enum Days
{
Sunday = 1,
TuesDay = 2,
wednesday=3
} //get value
int day = (int)Days.TuesDay;
Similar questions