News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Problems Running Programs

Started by quesoesbueno59, July 30, 2009, 03:05:06 AM

Previous topic - Next topic

quesoesbueno59

I am new to programming, and started with Code::Blocks since it was recommended by the online tutorials I'm doing. I made my Hello World program, and when I clicked on Build and Run in the drop down menu, it compiled but it didn't run. I went to look for the executable in the project folder, and I found it. I double clicked on it and a DOS window popped open then immediately closed. I couldn't read what it said, but it probably wasn't good. Any help?

Soulou

Hello,

It's a common problem, but this problem isn't one ^^. In fact, when you launch your program, nothing says that it must run after your Hello World.
There are two solutions :
- You can open a command prompt before and run pathtoyourprogram\yourprogram.exe
- You can add the function getchar(); before return 0; in your program, getchar ask the program to wait that you type a char.