what can be the Preproccesed code. of this syntax

Hey Guys......
i want to know what can be the preprocessed code of this synatax...
#define DEBUG(x) cout<< #x"="<<x<<endl

It would be nice if any one can describe me how is the code being processed?

Last edited on
'#x' is replaced with the code you pass as string, 'x' with its value
eg:
1
2
3
int i = 123;
DEBUG(i);//output: i=123
DEBUG(i+3);//output: i+3=126 



http://www.cplusplus.com/doc/tutorial/preprocessor/
Last edited on
Thanks for it ...it works..
Topic archived. No new replies allowed.