It seems rather tedious to output to debug window. Where can I find cout
output if I am writing a non-console information ?
Like:
double
Instead of using cout, create a log file and write anything you want into it.
Edit: Use this simple code for writing to a log file.
ofstream log;
log.open ("log.txt");
log << "Writing this to a file.\n";
log.close();
Yes, indeed, it's annoying.
Here's how I do it :
#define DBOUT( s ) \
{ \
std::wostringstream os_; \
os_ << s; \
OutputDebugStringW( os_.str().c_str() ); \
}
// example : DBOUT("some text " << some_variable << " some more text" << some_other_varaible << "\n");