Answers for "how to declare an enum variable c++"

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

Browse Popular Code Answers by Language