PDA

View Full Version : ##,what is the mean


zekeliu
07-19-2003, 09:20 PM
#define VTBL(iname) iname##Vtbl

What role does "##" play in the word of iname##Vtbl?
I don't know.I've never seen such usage.


another question is how to interpret the following sentence:

#define QINTERFACE(iname) \
struct _##iname {\
struct VTBL(iname) *pvt;\
};\
typedef struct VTBL(iname) VTBL(iname);\
struct VTBL(iname)


I am looking forward some helps.
Thank you in advance.

tom
07-19-2003, 09:42 PM
# the stringizing operator, ## is the concatenation operator

Dragon
07-25-2003, 05:45 PM
You can easily search for more information on this subject in your C-compiler's help file.

seijin
08-03-2006, 07:57 PM
For example, with the macro like this:
#define paste(front, back) front ## back

you will get the following result:
paste(name, 1) will create the token name1

(From "The ANSI C Programming Language 2nd ed. by Brian W. Kernighan and Dennis M", page 81)