Enumeration types, in C++, are essentially integer values, that is, int types.
Enumeration names are only for programmers and maintainers to read.
Such as enumeration
enum? test
{
Test 0,
TEST 1,
Test 2
}; In, the values of TEST0, TEST 1 and TEST2 are 0, 1, 2.
Therefore, for enumerated variables, their input and output can also be input and output according to int type.
such as
Enumeration test t;
CIN & gt; & gtt; //input
Cout & lt& lt "gets an enumeration t with the value"<& ltt<& ltendl///output.