casting - is there any easy way to convert int type to enum type in c language? -
how cast int enum in c?
enum b; int c; b = (a)c;
it doesn't work. error message 'a' undeclared
(in gcc)
as seem know declaring variable, enum types must prefixed word enum
.
b = (enum a)c;
Comments
Post a Comment