Hi all, today i was going thru a code, wer i found this macro definition, #define _L(a) (TPtrC((const TText *)L ## a)) where TPtrC and TText r user defined data-types, wat is the ## symbol for..... -priya
Can you let us have the complete context where you found this. [COMMENT]Also try creating the thread in the correct section and only one. I have closed the other thread as duplicate and moved them to the correct section as well.[/COMMENT]
## is a concatination preprocessor operator. #define _L(a) (TPtrC((const TText *)L ## a)) means here the value of 'a' is appended to (const TText *)L and the whole thing is passed to TPtrC function. For more clarification you can go through the link http://developer.apple.com/document...cc-4.0.1/cpp/Concatenation.html#Concatenation
i was asked by my senior to review a piece of code, and the statement was part of it.... it is clear to me now. Thanx
Sample code to make things more clear:- Code: #include<stdio.h> #define JOIN(a, b) a ## b int main() { printf("%s",JOIN("Hi","Everyone")); return 0; }