No console output on cout

前端 未结 7 2082
情歌与酒
情歌与酒 2020-12-19 06:11

Good morning,

I have a problem with Eclipse IDE for C/C++ Developers.

I\'m writting a smal tool for converting Strings. While testing on some point e

7条回答
  •  天命终不由人
    2020-12-19 06:29

    For me installing the 32 bit versions of Eclipse (Indigo 3.7) and the 32 bit Java JDK/JRE did not work. I use the much quicker solution from the Eclipse CDT/User/FAQ:

    Quote from Eclipse CDT/User/FAQ - Eclipse console does not show output on Windows:

    Eclipse console does not show output on Windows In Eclipse CDT on Windows, standard output of the program being run or debugged is fully buffered, because it is not connected to a Windwos console, but to a pipe. See bug 173732 for more details. Either add fflush calls after every printf or add the following lines in the start of the main function:

    setvbuf(stdout, NULL, _IONBF, 0); 
    setvbuf(stderr, NULL, _IONBF, 0);
    

提交回复
热议问题