-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.

2
  • 1
    iirc, that is not supported. There may be a VS extension to support it, like VsConsoleOutput (which I haven't tried myself). Commented Aug 23, 2022 at 18:47
  • Look up OutputDebugString(). This may only work in debug mode. Commented Aug 24, 2022 at 0:10

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

2 Comments

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 , I am sorry to tell you that the current function of VS cannot realize this idea.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.