Hi all,
I am just going through C++ basics now and I read that enum types cannot be input directly with cout and cin and such.And also that type coercion from int to enum is not allowed.But when i do this,
enum SumEnum{ENUM1,ENUM2,ENUM3}
SumEnum VarEnum;
scanf("%d",&VarEnum);
printf("%d",VarEnum);
It happens perfectly.printf is ok because enum to int coercion is allowed,but how come scanf works if int to enum is not allowed?
Thanks in advance.