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

≯℡__Kan透↙ 提交于 2019-12-01 12:24:22

问题


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. Did anybody have this problem?


回答1:


If you're practicing c try fflush, if c++ try cout << endl; each time you want to print.



来源:https://stackoverflow.com/questions/3316195/xcode-not-showing-console-output-how-do-you-flush-the-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!