Dear all,
I am reading existing source code, and meet ## symbol
Really I don't know what does this symbol mean?
The line of code is:
Can you show me the meaning of ## ?Code:char *cli_name ## _help[] = {##ARGS, NULL};
This is a discussion on ## symbol in C language within the C Programming forums, part of the General Programming Boards category; Dear all, I am reading existing source code, and meet ## symbol Really I don't know what does this symbol ...
Dear all,
I am reading existing source code, and meet ## symbol
Really I don't know what does this symbol mean?
The line of code is:
Can you show me the meaning of ## ?Code:char *cli_name ## _help[] = {##ARGS, NULL};
Read up on the C preprocessor, in particular on token concatenation.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Dear laserlight
I only found this section:
from: The GNU C LibraryCode:${variable##prefix} Substitute the value of variable, but first discard from that variable any portion at the beginning that matches the pattern prefix. If there is more than one alternative for how to match against prefix, this construct uses the longest possible match. Thus, ‘${foo##*t}’ substitutes ‘or’, because the largest match for ‘*t’ at the beginning of ‘tractor’ is ‘tract’.
But, actually, I don't understand its meaning
You should be reading about the language feature of the preprocessor, not on the library.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Dear laserlight
I found it, ## is used to concatenate two strings
Preprocessor directives - C++ Documentation
Thank you very much for your help