Ahojte, chcem si spravit makro na podmieneny vypis takto:
Kód:
#define PRINT(...) \
#ifdef DEBUG_OUTPUT\
DbgPrint(__VA_ARGS__);\
#endif
ale bohuzial to nefunguje a vypisuje tieto errory:
Kód:
1>c:\users\administrator\desktop\work\testing\driver\driver.c(536) : error C2065: 'endif' : undeclared identifier
1>c:\users\administrator\desktop\work\testing\driver\driver.c(546) : error C2065: 'ifdef' : undeclared identifier
1>c:\users\administrator\desktop\work\testing\driver\driver.c(546) : error C2146: syntax error : missing ';' before identifier 'DbgPrint'
1>c:\users\administrator\desktop\work\testing\driver\driver.c(546) : error C2065: 'endif' : undeclared identifier
1>c:\users\administrator\desktop\work\testing\driver\driver.c(553) : error C2065: 'ifdef' : undeclared identifier
1>c:\users\administrator\desktop\work\testing\driver\driver.c(553) : error C2146: syntax error : missing ';' before identifier 'DbgPrint'
1>c:\users\administrator\desktop\work\testing\driver\driver.c(553) : error C2065: 'endif' : undeclared identifier
1>c:\users\administrator\desktop\work\testing\driver\driver.c(602) : error C2065: 'ifdef' : undeclared identifier
Skusal som aj '\' pred '#' ale konci to s illegal escape sequence. Nejake napady?