This works
printf("%s body\n",__PRETTY_FUNCTION__);
But this does not (Error Expected ')'):
printf(__PRETTY_FUNCTION__" body\n");
I can’t get the IDE to show me what __PRETTY_FUNCTION__ evaluates to to determine why it does not work.
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.
__PRETTY_FUNCTION__is not a macro. It behaves like a static variable created on the fly scoped in that function.The last paragraph in the link above reads: