Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8150385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:03:01+00:00 2026-06-06T15:03:01+00:00

This works printf(%s body\n,__PRETTY_FUNCTION__); But this does not (Error Expected ‘)’ ): printf(__PRETTY_FUNCTION__ body\n);

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:03:04+00:00Added an answer on June 6, 2026 at 3:03 pm

    __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:

    These identifiers are not preprocessor macros. In GCC 3.3 and earlier, in C only, __FUNCTION__ and __PRETTY_FUNCTION__ were treated as string literals; they could be used to initialize char arrays, and they could be concatenated with other string literals. GCC 3.4 and later treat them as variables, like __func__. In C++, __FUNCTION__ and __PRETTY_FUNCTION__ have always been variables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ok, this code works just fine in Chrome. But, for some reason it does
int main() { int *d=0; printf(%d\n,*d); return 0; } this works fine. >cc legal.c
int main() { int i=3; (++i)++; printf(%d,i); } This programs works with g++ compiler
In this code: int main(int a, int b) { printf( main(int, int) works \n\n);
this call my $th = threads->create(\&print, Hello thread World!\n); $th->join(); works fine. But as
I faced this strange situation where foreach like construct of javascript does not work
Very confused about this one. This code in views.py works, but only when I'm
Why this does not work ON INTERNET EXPLORER: I have this html input tag.
This will seem like a stupid question to most of you but why can't
I know this works very well: def locations(city, *other_cities): print(city, other_cities) Now I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.