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.
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:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.