Code::Blocks console app won't show output

て烟熏妆下的殇ゞ 提交于 2020-01-12 18:51:55

问题


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;
}

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?

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


回答1:


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

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

sudo apt-get install xterm




回答2:


Maybe you need to set the terminal to lunch the console applications. It can be done in the general environment settings.



来源:https://stackoverflow.com/questions/7554836/codeblocks-console-app-wont-show-output

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