How to make a macro that can take a string?

Viewed 15298

I'm trying to do something really trivial: A macro that takes an string and prints that to NSLog.

Like this:

#define PRINTTHIS(text) \
    NSLog(@"text");

However, when I try to pass a string to this guy I end up getting "text" printed to the console. Aren't all variables replaced on a string-level inside the macro? How to do that right?

8 Answers
Related