简体   繁体   English

Xcode不显示控制台输出; 您如何刷新控制台?

[英]Xcode not showing console output; How do you flush the console?

I have a simple C++ program that uses cout and printf to log stuff and it is only showing at the end when the program is closed but if I'm stepping through the program using debug nothing is shown. 我有一个简单的C ++程序,该程序使用cout和printf记录内容,并且仅在程序关闭时显示在结尾,但是如果我使用debug单步执行程序,则不会显示任何内容。 Did anybody have this problem? 有人有这个问题吗?

If you're practicing c try fflush , if c++ try cout << endl; 如果您正在练习c,请尝试fflush ;如果c ++,请尝试cout << endl; each time you want to print. 每次要打印。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM