Suppose I have defined an item
#define CLASSNAME MyClass
and I then want the preprocessor to generate a string constant "MyClass" e.g
std::string str("MyClass")
I cannot of course write
std::string str("CLASSNAME")
Because being it between "" CLASSNAME would not be considered as a defined item but as the plain string content. I don't want to include the "" in the #define i.e
#define CLASSNAME "MyClass"
because later I may want to call a class MyClass automatically i.e
class CLASSNAME
{
}
How can I do to have the preprocessor include the "" in the string definition? Thanks