User forums > Using Code::Blocks
cout not working in codeblocks
cbusername:
default program is not working. It shows no error, but does not output.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
jarod42:
Do you check the 'pause when execution ends' in build target options ?
cbusername:
In build options there is no 'pause when execution end' option. that is 'build option' in global compiler settings. Still not working.
cbusername:
My apologies. I found build target option and 'pause when execution ends' was checked.
I unchecked it and tried, but I am getting the same problem.
jarod42:
Right-click on your project, click 'Properties...'
click on the 'Build target' tab
check that the checkbox 'pause when execution ends' is checked for each build target (Debug/Release).
What does happen if you launch your executable from cmd line ?
Navigation
[0] Message Index
[#] Next page
Go to full version