| | |
| Stránka: 1 z 1
| [ Príspevkov: 3 ] | |
Autor | Správa |
---|
Registrovaný: 13.01.09 Prihlásený: 15.10.13 Príspevky: 113 Témy: 38 | Napísal ewil: 30.05.2012 8:16 | |
|
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?
_________________ NB: kedysi: MSI GX620, LENOVO SL510 teraz: Lenovo TP Edge E520 |
|
Registrovaný: 11.01.09 Prihlásený: 25.04.24 Príspevky: 1385 Témy: 9 Bydlisko: Hrinova | Napísal Fico: 30.05.2012 9:46 | |
|
Take nieco sa neda, musis to rozdelit:
Kód: #ifdef DEBUG_OUTPUT #define PRINT(...) \ DbgPrint(__VA_ARGS__); #else #define PRINT(...) \ printf( "nieco ine" ); #endif
|
|
Registrovaný: 13.01.09 Prihlásený: 15.10.13 Príspevky: 113 Témy: 38 | Napísal autor témy ewil: 30.05.2012 11:17 | |
|
oki, vdaka
_________________ NB: kedysi: MSI GX620, LENOVO SL510 teraz: Lenovo TP Edge E520 |
|
| Stránka: 1 z 1
| [ Príspevkov: 3 ] | |
| Nemôžete zakladať nové témy v tomto fóre Nemôžete odpovedať na témy v tomto fóre Nemôžete upravovať svoje príspevky v tomto fóre Nemôžete mazať svoje príspevky v tomto fóre
|
|