I looked at a sample code to create a log system on my server… And I found this
#if DEBUG
printf("something here");
#endif
I know what it does. It prtins something only if DEBUG has been defiend. But where is DEBUG defined? I looked at the all the header files but I could’t find DEBUG..
Also, Could you please provide me a good example or tutorial about designing logging system?
Thanks in advance..
Compilers, at least those I know of, have an option to define preprossessor macros from “the outside” of compiled files.
For example, to define
DEBUGwith a microsoft compiler, you’d go with something like