1. #include <stdio.h> 2. 3. #define DEBUG(format,...) printf("[File:%s, Line:%d] "format, __FILE__, __LINE__, ##__VA_ARGS__) 4. 5. 6. int main(void) 7. { 8. DEBUG("hello world\n"); 9. return 0; 10. } 11.
1. #include <stdio.h> 2. 3. #define DEBUG(format,...) printf("[File:%s, Line:%d] "format, __FILE__, __LINE__, ##__VA_ARGS__) 4. 5. 6. int main(void) 7. { 8. DEBUG("hello world\n"); 9. return 0; 10. } 11.