#include <iostream> #define enum_to_string(x) #x
enum sex { boy, girl, };
int main() { std::cout << enum_to_string(sex::boy) << std::endl; system(“pause”); }