Skip to content

Latest commit

 

History

History

Algorith

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

剑指offer Study Timeline and Note

Time 剑指offer
7.19 1 - 6
  1. Debug I found they using Macro for Debugging very interesting, they actually using something like:
    #ifdef ... //Debug Mode
    #define debug cout
    #else
    #define debug 0 && cout
    #endif
    int main(){
        // Stuff
        debug <<"Stuff..." <<endl;
    Meaning that if Debug Mode is on, then somethings would be output, but if Debug Mode is off, then debug will be replaced by 0 && cout, when 0 && would end any expression, which meaning nothing would be output, and that's actually Debug Mode off.