prev up next   top/contents search

comp.lang.c FAQ list · Question 2.24

Q: Is there an easy way to print enumeration values symbolically?

A: No. You can write a little function (one per enumeration) to map an enumeration constant to a string, either by using a switch statement or by searching an array. (For debugging purposes, a good debugger should automatically print enumeration constants symbolically.)

prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North