Reputation: 772
Here's my scenario: I have a set of source files that I'd prefer to not modify, but I'd like to replace some of the string literals with other values. Here's an example:
#define "oldString" "newString"
Upvotes: 2
Views: 220
Reputation: 46943
No, #define
allows you to give a value to an identifier. Identifiers can't contain the quote character.
Upvotes: 5
Reputation: 70731
No, that's not possible. If you had already used macros in place of the strings, it would have been simple to change the macro definition to use a different string -- better late than never, you might want to do it now.
Upvotes: 5