开发者

Visual C++ Test project doesn't display standard output

开发者 https://www.devze.com 2023-01-19 19:01 出处:网络
I created a Visual C++ test project which contains printf statements. Unfortunately, I can\'t find a method to view the output of this. It isn\'t included in the output window. Any开发者_StackOverflow

I created a Visual C++ test project which contains printf statements. Unfortunately, I can't find a method to view the output of this. It isn't included in the output window. Any开发者_StackOverflow suggestions?


You can redirect standard output to a file and open this file in some auto-refreshing viewer.

UPDATE: Here are two ways to redirect standard output to a file, that I found:

  1. cmd way: C:\Test>myWinApp.exe > log.txt
  2. powershell way: PS C:\Test> .\myWinApp.exe 2>&1 | out-file log.txt

If you want to view the output in real time, you can open log.txt in some file viewer with auto-refreshing option. see link

0

精彩评论

暂无评论...
验证码 换一张
取 消