Can pre-ANSI C Preprocessor handle symbolic constants in strings?

Brian Bliss bliss at sp64.csrd.uiuc.edu
Sat Jun 1 01:49:37 AEST 1991


the following work on a sun and most other non-ANSI cpp's:

#define quote(x) "x"

if you're afraid that some preprocessor won't do macro substitution
inside strings, try:

#define quote2(x) "x
#define quote(x) quote2(x")

bb



More information about the Comp.lang.c mailing list