Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ enum

/* Defining the enum */
enum vals {val1, val2, val3};

/* Setting a variable to an enum's value */
vals some_val;
some_val = val3;
Source by en.cppreference.com #
 
PREVIOUS NEXT
Tagged: #enum
ADD COMMENT
Topic
Name
1+4 =