Search:
Forum
General C++ Programming
what can be the Preproccesed code. of th
what can be the Preproccesed code. of this syntax
Apr 10, 2009 at 5:01pm UTC
ajay16oct
(24)
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
Apr 10, 2009 at 5:09pm UTC
Apr 10, 2009 at 5:12pm UTC
Bazzy
(6281)
'#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
Apr 10, 2009 at 5:13pm UTC
Apr 10, 2009 at 5:23pm UTC
ajay16oct
(24)
Thanks for it ...it works..
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs