Code :: Blocks控制台应用程序不会显示输出 [英] Code::Blocks console app won't show output

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

问题描述

我在Code :: Blocks中有一个应用程序,它是简单的Hello,世界传统程序。

I've got an application in Code::Blocks, and it's the simple Hello, World traditional program.

#include <iostream>

int main() {
    std::cout << "Hello, World!" << std::endl;
}

程序构建并执行,但不会显示输出。我检查了Code :: Blocks中的项目属性,它绝对设置为控制台应用程序。有关问题的任何建议吗?

The program builds and executes, but the output isn't shown. I checked the project properties in Code::Blocks and it is definitely set to console application. Any suggestions as to the problem?

编辑:输出只在IDE中失败。

The output only fails in the IDE. When run separately the resulting executable functions exactly as expected.

推荐答案

这可能是你没有

It's possible that you don't have xterm installed it.

如果您使用的是Linux(Debian风格),您可以使用您的软件包管理器安装它:

If you are on Linux (Debian flavor) you can install it with your package manager like so:

sudo apt-get install xterm

这篇关于Code :: Blocks控制台应用程序不会显示输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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