- Joined
- Mar 23, 2013
- Messages
- 1
- Reaction score
- 0
Can someone tell me what is wrong here ?
#define LOG_MACRO(format,args...) printf(format,args)
#define TEST_MACRO(__arg1, __arg2, __format, args...) LOG_MACRO("ARG1: %s, ARG2 : %s" ## __format, ##args)
char* arg1 = "test";
char* arg2 = "test";
TEST_MACRO(arg1,arg2,"Testing Macro %s","foo");
error: pasting ""ARG1: %s, ARG2 : %s"" and ""Testing Macro %s"" does not give a valid preprocessing token
#define LOG_MACRO(format,args...) printf(format,args)
#define TEST_MACRO(__arg1, __arg2, __format, args...) LOG_MACRO("ARG1: %s, ARG2 : %s" ## __format, ##args)
char* arg1 = "test";
char* arg2 = "test";
TEST_MACRO(arg1,arg2,"Testing Macro %s","foo");
error: pasting ""ARG1: %s, ARG2 : %s"" and ""Testing Macro %s"" does not give a valid preprocessing token