how to do something like that in eclipse for c
#ifdef _DEBUG printf("debug mode is on\n");
#elif printf("debug mode is off\n");
I googled it and found that I need to use #ifdeb, but unfortunately it didn’t work
thanks in advance for any help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The #ifdef and #elif use the whole line as the condition so the printf s are being interpreted as part of the #if. You need to put the code on separate lines and use a #endif to close the #if
e.g.