Answers for "c++ enum to string"

C++
1

c++ enum to string

//There really is no beautiful way of doing this.
//Just set up an array of strings indexed by the enum.
//If you do a lot of output, you can define an operator<< that-
//-takes an enum parameter and does the lookup for you.
Posted by: Guest on November-04-2020

Browse Popular Code Answers by Language