Qtcreator the console project printf () method does not deal with the problem display

Problem: non-qt Qtcreator created, console project when debugging the debug output window does not output information,

Method 1: Run the project configuration check run in terminal option, in view of the terminal.
Method 2: Use printf in the standard output and standard error qt console output of the project has cache, cache output just reached a certain level, you can set immediate output is as follows.
setvbuf (stdout, 0, _IONBF, 0);
1
so you can see the output information directly into the output console
--------------------- 
Author: flfihpv259 
Source: CSDN 
original: https: //blog.csdn.net/flfihpv259/article/details/87608124 
copyright: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin blog.csdn.net/wojiuguowei/article/details/93843617