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
To output a string to the debug console, use OutputDebugStringA
. See http://msdn.microsoft.com/en-us/library/windows/desktop/aa363362%28v=vs.85%29.aspx
To output variable values to the debug console, using std::ostringstream
, the send the string to OutputDebugStringA
.
Excessive output statements will cause the program to severly slow down. However, it is a good technique to catch things the debugger has a problem with, such as the actual child members when playing with base pointers.