I tried the solution suggested in the question Having the output of a console application in Visual Studio instead of the console, but none of them are working. Please help.
1 Answer
I suggest you read this issue carefully.
About how to use OutputDebugString() I wrote a sample for your reference.
int main() { char buffer[100]; sprintf_s(buffer, "check it out: %s\n", "this is a sample"); OutputDebugStringA(buffer); return 0; } Result:
2 Comments
Pawan Kumar
It is not mandatory to print output in internal console, if one has to do too much extra work. Is it possible to make some setting in Visual Studio IDE so that it works with simple "cout" ??
Yujian Yao - MSFT
@Pawan Kumar , I am sorry to tell you that the current function of VS cannot realize this idea.

OutputDebugString(). This may only work in debug mode.