I have some old code that tries to construct identifiers with a macro like ...
I have some old code that tries to construct identifiers with a macro like
#define Paste(a, b) a/**/b
but it doesn't work any more.
It was an undocumented feature of some early preprocessor implementations (notably Reiser's) that comments disappeared entirely and could therefore be used for token pasting. ANSI affirms (as did K&R1) that comments are replaced with white space, so they cannot portably be used in a Paste() macro. However, since the need for pasting tokens was demonstrated and real, ANSI introduced a well-defined token-pasting operator, ##, which can be used like this:
#define Paste(a, b) a##b
Here is one other method you could try for pasting tokens under a pre-ANSI compiler:
#define XPaste(s) s
#define Paste(a, b) XPaste(a)b
2016-01-27, 988👍, 0💬
How To Control Table Widths? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells Usually, b...
How To Increment Dates by 1? - MySQL FAQs - Introduction to SQL Date and Time Handling If you have a...
From performance point of view how do they rate ? Repeater is fastest followed by Datalist and final...
Which are the various programming approaches for WCF?
What is the difference between Authentication and authorization? This can be a tricky question. Thes...