Enum names as strings in C++

Printing enum names in C++ is pretty easy if preprocessor concatenation operator is used. In the example, the second macro assumes that enum class is used, so it skips class name before two semicolons. Buffer is needed to reserve space for the result.

enums.cpp

ready.

10 print "mail: contact at alepho.com | skype: karastojko | stackoverflow: karastojko | github: karastojko"
20 print "(c) 2009-2023 www.alepho.com"