enum foo { Closed = 0, ReadOnly = 1, WriteOnly = 2 }; static char *stateNames[] = { "Closed", "ReadOnly", "WriteOnly"};