Last active
August 29, 2015 14:10
-
-
Save mandyedi/33b700ff4d01d60d1b3a to your computer and use it in GitHub Desktop.
c++: macro: debug log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#define DEBUG 1 | |
void PrintInfo( const char *str ) | |
{ | |
std::cout << str << std::endl; | |
} | |
#if DEBUG | |
#define LOG_INFO( str ) PrintInfo( str ) | |
#else | |
#define LOG_INFO( str ) 0 | |
#endif | |
int _tmain( int argc, char *argv[] ) | |
{ | |
LOG_INFO( "teszt" ); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment