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.
Originally Answered: How do I get output screen for code written in C++ in codeblocks? Press F9 on your keyboard,it builds and runs your program in Codeblocks.
Is it because of the compiler? in here, tap Auto-detect in “Compiler's installation directory”, or tap '…' dots to manually assign the location for MinGW/bin/ folder where (c++.exe, gcc.exe etc) toolchains are located. If you've only downloaded codeblocks.exe setup, then you'll have to install compiler manually.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With