-
Debug printfDev Language/C 2011. 7. 13. 17:53debug.h
#define DEBUG_NONE 0
#define DEBUG_PRINT 1
#if (DEBUG) & DEBUG_PRINT
#define <stdio.h>
#define PRINTF(...) printf(__VA_ARGS__)
... 기타 매크로 정의
#else //!DEBUG_PRINT
#define PRINTF(...)
#endif---
다른 파일에서
#define DEBUG DEBUG DEBUG_PRINT
선언하고
벌레잡기용 PRINTF("ㅁㄴㅇㄻㅁㄴㅇㄹ"); 사용
---
벌레잡기 완료되면, #define DEBUG DEBUG_NONE