I need help!

I just started in C++, and I downloaded a complier called Bloodshed Dev-C++ beta of the newest version. I wrote a simple program, tested it for errors and compiled it. When I tried to execute the code, a Comand Prompt window opens up, and the end result of my program is in there. Only problem is that the window pops up for like less than a second and then it closes.