Answers for "c++ declare enum and use it in static variable"

C++
0

how to declare an enum variable c++

#include <iostream>
using namespace std;
enum direction {East, West, North, South};
int main(){
   direction dir;
   dir = South; 
   cout<<dir;   
   return 0;
}
Posted by: Guest on August-20-2021

Code answers related to "c++ declare enum and use it in static variable"

Browse Popular Code Answers by Language