Search
 
SCRIPT & CODE EXAMPLE
 

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;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ string find last number 
Cpp :: declare empty array in c++ 
Cpp :: inline function in cpp 
Cpp :: balanced brackets in c++ 
Cpp :: std::map get all keys 
Cpp :: statements 
Cpp :: find nth fibonacci number 
Cpp :: c++ print array of arrays with pointer 
Cpp :: int to string C++ Using stringstream class 
Cpp :: c++ sorting and keeping track of indexes 
Cpp :: select elements from array C++ 
Cpp :: order 2d array in c++ 
Cpp :: c++ create function pointer 
Cpp :: c language all keywords in string 
Cpp :: Shell-Sort C++ 
Cpp :: c++ vector operations 
Cpp :: bubble sort function in c++ 
Cpp :: data type c++ 
Cpp :: c++ overloading by ref-qualifiers 
Cpp :: c++ read entire file into a variable 
Cpp :: prefix using stack 
Cpp :: OpenCV" is considered to be NOT FOUND 
Cpp :: scope resulation operator :: in c++ 
Cpp :: void setup() { // put your setup code here, to run once:in m}void loop() { // put your main code here, to run repeatedly:} 
Cpp :: c++ stack 
Cpp :: progress bar custom color c++ buider 
Cpp :: c++ constructor inheritance 
Cpp :: sjfoajf;klsjflasdkfjk;lasjfjajkf;dslafjdjalkkkjakkkkkkkkkkkkkkkkfaWZdfbhjkkkk gauds 
Cpp :: c++ to mips assembly converter 
Cpp :: transform c++ 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =