Printing output on the Output Window in Visual C++ IDE

前端 未结 5 1732
生来不讨喜
生来不讨喜 2021-01-06 12:38

How do I print on the output window in Visual C++? The project that I am working on isn\'t of a console window project type. That\'s when I build and run it, it doesn\'t ope

5条回答
  •  粉色の甜心
    2021-01-06 12:48

    Instead of printing to the Output window in VS as indicated by other answers, I prefer to create a console window in my GUI apps, then use regular printf or cout to write debugging info to it. This has the benefit that you can do it even when you run without the debugger.

    See this site for a simple function that sets up a console.

提交回复
热议问题