CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13

Threaded View

  1. #1
    George2 is offline Elite Member Power Poster
    Join Date
    Oct 2002
    Posts
    4,468

    A strange usage of # and sizeof.

    Hello everyone,


    I have found a very strange usage of # and sizeof from the following statement,

    Code:
    #define FOO(p) static const struct_goo p = { .length = sizeof(#p "\n")};
    What means "#p"? What is the meaning of the parameter -- #p "\n" -- passed to sizeof?


    thanks in advance,
    George
    Last edited by George2; October 18th, 2005 at 09:21 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured