Possible Duplicate:
c++ console in a non-console application project
I am debugging windows program which started with winmain. There are smome printf inside, I am wondering if I can view the printf output somewhere? Do I need some special tools?
Possible Duplicate:
c++ console in a non-console application project
I am debugging windows program which started with winmain. There are smome printf inside, I am wondering if I can view the printf output somewhere? Do I need some special tools?
Assuming you're using VC++ you can use OutputDebugString to display output in the IDE.
something like:
wchar_t buffer[512]
wsprintf(buffer, L"Value is %d\n", value);
OutputDebugString(buffer);
Try this:
AllocConsole();
freopen("CONOUT$", "wb", stdout);
// your printf()
fclose(stdout);
FreeConsole();