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
I'd like to give my 2 cents.
Given that the maybe is a VS issue about compliancy with the C++ standard or that we could use OutputDebugStringA
, if you cannot modify your code base you may like the idea of simply redirect the std::cout to something else, like a file.
So without changing your code base you can do something like suggested here:How to redirect cin and cout to files?
Condensed:
#include
std::ofstream out("out.txt"); std::streambuf *coutbuf = std::cout.rdbuf(); //save old buf std::cout.rdbuf(out.rdbuf()); //redirect std::cout to out.txt!
std::cout.rdbuf(coutbuf); //reset to standard output again
Hope this may help someone, Kudos to Nawaz that provided the answer in the other thread.