-1

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.

Pawan Kumar
  • 114
  • 9

1 Answers1

0

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:

enter image description here

Yujian Yao - MSFT
  • 945
  • 1
  • 3
  • 9
  • 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" ?? – Pawan Kumar Aug 24 '22 at 09:40
  • @Pawan Kumar , I am sorry to tell you that the current function of VS cannot realize this idea. – Yujian Yao - MSFT Aug 25 '22 at 07:21