Eclipse CDT调试控制台未显示程序输出 [英] Eclipse CDT Debug console not displaying program output

查看:127
本文介绍了Eclipse CDT调试控制台未显示程序输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用面向C/C ++开发人员的Eclipse IDE(Eclipse Windows XP上具有 GDB 6.8-3 .

I am using Eclipse IDE for C/C++ Developers (Eclipse Ganymede Package - version 3.4.2) on Windows XP with MinGW GCC 4.2.1 and GDB 6.8-3.

我面临的问题与此处.一个简单的hello world程序将不会打印到调试器中的控制台输出.运行命令可以正确显示输出.我已经检查了gdb输出控制台和输出控制台.

I am facing a problem very similar to that mentioned here. A simple hello world program will not print to the console output in the debugger. A run command displays the output correctly. I have checked both gdb output console and the output console.

在Eclipse的控制台窗口中获取输出的正确设置是什么?

What are the right settings to get the output in console window of eclipse?

推荐答案

///您是否已将endl放在输出的末尾?

//have you put endl at the end of your output?

int main()
{
    cout << "!!!Hello World!!!"; // prints nothing to console ; no endl
    cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! twice
    return 0;
}

这篇关于Eclipse CDT调试控制台未显示程序输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆