Thread Stringification: im Gnu C Präprozessor (12 answers)
Opened by betterworld at 2003-11-15 22:32

esskar
 2003-11-15 22:54
#11563 #11563
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
oder willst du einfach nur den string in der compilezeit berechnen?

Code: (dl )
1
2
3
4
5
6
7
#define ERROR_RECURSION(n) \
do { if (n) \
fprintf (stderr, "Too many recursions (" #n ")\n"); \
exit(0); \
while (0)

if(rec > MAX_RECURSIONS) ERROR_RECURSION(MAX_RECURSIONS);

View full thread Stringification: im Gnu C Präprozessor