Created
October 24, 2012 15:13
-
-
Save mike-zhang/3946678 to your computer and use it in GitHub Desktop.
使用预处理进行调试(c++ demo)
This file contains hidden or 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 NDEBUG // or : g++ -DNDEBUG debugTest.cpp -o debugTest | |
#include <cassert> | |
using namespace std; | |
int main() | |
{ | |
cout<<__FILE__<<endl; | |
cout<<__LINE__<<endl; | |
cout<<__TIME__<<endl; | |
cout<<__DATE__<<endl; | |
assert(1 > 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment