c++ Programming Glossary: errorb
C++: Print out enum value as text http://stackoverflow.com/questions/3342726/c-print-out-enum-value-as-text as text If i have an enum like this enum Errors ErrorA 0 ErrorB ErrorC Then i want to print out to console Errors anError ErrorA.. iostream #include map #include string enum Errors ErrorA 0 ErrorB ErrorC std ostream operator std ostream out const Errors value.. p strings p #p INSERT_ELEMENT ErrorA INSERT_ELEMENT ErrorB INSERT_ELEMENT ErrorC #undef INSERT_ELEMENT return out strings..
|