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

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?