"Samuel Zhang" <[EMAIL PROTECTED]> wrote:
> i don't understand why there is # sign befor "type" (return #type) and
> "impl"(return #imple",also i don't understand why there is ##_## in
> the function declaration of type##_##impl().
run gcc with -E to see the preprocessor output.
#bla puts the value of the macro parameter bla under quotes.
#define foo(bla) printf("%s", #bla)
foo(bar) -> printf("%s", "bar")
bla ## foo cats bla and foo together without the whitespace inbetween.
#define bla s
#define foo printf
bla ## foo ## (buf, "%s", "bar") -> sprintf(buf, "%s", "bar")
hope this helps ...
clemens