[BraLUG] wahrscheinlich ganz einfache C-Frage

Markus Dahms mad at automagically.de
So Sep 23 10:02:52 CEST 2007


Hallo Uwe, Tobias,

> Aber Du brauchst dazu eben zwei Ebenen von stringification.

habe ich auch schon mal gehoert, jetzt aber einfach mal so ausprobiert,
nur eine Ebene zu benutzen und das geht bei mir auch:

| #include <stdio.h>
| 
| #define A 1
| #define B 2
| #define C 3
| #define STR(a) #a
| #define BLUBB "bla blubb " STR(A) " " STR(B) " " STR(C)
| 
| int main()
| {
|     printf(BLUBB);
|     return(0);
| }

(gcc 4.2.1)

Gruesse,

	Markus

-- 
C++ is a horrible language. It's made more horrible by the fact that a lot of
substandard programmers use it, to the point where it's much much easier to
generate total and utter crap with it. Quite frankly, even if the choice of C
were to do *nothing* but keep the C++ programmers out, that in itself would be
a huge reason to use C.                                      -- Linus Torvalds



Mehr Informationen über die Mailingliste Bralug