Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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;
}
Source by beginnersbook.com #
 
PREVIOUS NEXT
Tagged: #declare #enum #variable
ADD COMMENT
Topic
Name
7+1 =