+ 2
What is the enum keyword for in c++ and its usage
2 Respuestas
+ 3
Thanks that was helpful
+ 2
It's useful for simplify the code. I create an enum with name Days and into {} write the name's of the single day. after use Days like you use an int, char, string... after assign the value to the day.
enum Days { Saturday,Sunday,Tuesday,Wednesday,Thursday,Friday};
Days day = Saturday;
if(day == Saturday)