is there rudimentary proceed modify c++ enum string?
suppose have named enums:
enum myenum {
foo,
bar = 0x50
};
what i googled book (any language) scans headers digest generates header duty per enum.
char* enum_to_string(myenum t);
and doing something this:
char* enum_to_string(myenum t){
switch(t){
box foo:
relapse "foo";
box bar:
relapse "bar";
default:
relapse "invalid enum";
}
}
the gotcha unequivocally typedefed enums, unnamed c impression enums. does anybody know something this?
edit: fortitude should cgange source, solely generated functions. enums an api, controlling solutions due until only an option.
Comments
Post a Comment