In graphical Windows applications, a handy trick for testing is to redirect stdio, stdout and stderr to a text based console window.
To achieve this is VS C++, simple put the following code somewhere near the top of your application. You need only do this once per thread:
AllocConsole();
freopen("conin$","r",stdin);
freopen("conout$","w",stdout);
freopen("conout$","w",stderr);