#define DEBUG 1
.
.
.
char *c=(char*)malloc(8);
#if DEBUG == 1
if(!c)
printf("error on malloc in function myfunction\n");
#endif
What I only want to know is if this is a good practice for debugging a program, if you recommend me this. When the version is to release, of course it has to be compiled with DEBUG=0
Thank you very much!!


Sign In
Create Account


Back to top









