How can you view printf output in a Win32 application (entering with a WinMain) in Visual Studio 2010?
Another way which wouldn't require changing existing printf's and also print to VS output window would go something like this:
#define printf printf2
int __cdecl printf2(const char *format, ...)
{
char str[1024];
va_list argptr;
va_start(argptr, format);
int ret = vsnprintf(str, sizeof(str), format, argptr);
va_end(argptr);
OutputDebugStringA(str);
return ret;
}
...
printf("remains %s", "the same");