开发者

Code::Blocks console app won't show output

开发者 https://www.devze.com 2023-04-07 07:52 出处:网络
I\'ve got an application in Code::Blocks, and it\'s the simple Hello, World traditional program. #include <iostream>

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 ru开发者_如何学Cn separately the resulting executable functions exactly as expected.


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号