c++ - Token pasting and __LINE__ - Stack Overflow
When you try to stringize something with #x, that x must be a macro parameter: #define FOO #__LINE__ /* this is not okay */ #define BAR(x) #x /* this is okay */ But you cannot simply say BAR(__LINE__), because this will pass the token __LINE__ into BAR .....