Is there a __CLASS__ macro in C++ which gives the class name similar to __FUNCTION__ macro which gives the function name
Is there a __CLASS__ macro in C++ which gives the class name similar to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The closest thing there’s is to call
typeid(your_class).name()– but this produces compiler specific mangled name.To use it inside class just
typeid(*this).name()