Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,233 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,753 people online right now. Registration is fast and FREE... Join Now!




C++ Compiler Help

 
Reply to this topicStart new topic

C++ Compiler Help

7OXIC
15 Mar, 2007 - 02:55 PM
Post #1

New D.I.C Head
*

Joined: 14 Mar, 2007
Posts: 10


My Contributions
Ok, I am using the Dev-C++ compiler and I am having a problem with it when I go to run my code. It just happened all of a sudden and I do not know why. When I click on the run button, the window comes up but then closes instantly. It was working one sec, and now its not. I didnt even change the code when it stopped working. I've tried using other codes that have worked in the past, and the same thing happens.

Any suggestions?
User is offlineProfile CardPM
+Quote Post

GWatt
RE: C++ Compiler Help
15 Mar, 2007 - 03:08 PM
Post #2

human inside
Group Icon

Joined: 1 Dec, 2005
Posts: 2,199



Thanked: 20 times
Dream Kudos: 450
My Contributions
The program runs, and then once it finishes the the window closes. Try adding cin.ignore() if you are using C++, or getchar() if you are using C.
User is online!Profile CardPM
+Quote Post

cipherence
RE: C++ Compiler Help
15 Mar, 2007 - 03:35 PM
Post #3

D.I.C Regular
Group Icon

Joined: 1 Apr, 2006
Posts: 260



Thanked: 1 times
Dream Kudos: 650
My Contributions
or put
CODE
system("pause");
at the end.
User is offlineProfile CardPM
+Quote Post

pietra
RE: C++ Compiler Help
15 Mar, 2007 - 03:36 PM
Post #4

D.I.C Head
**

Joined: 8 Feb, 2007
Posts: 70


My Contributions
I'm not sure if it's same for C and C++, but here's topic that might help you.

http://www.dreamincode.net/forums/showtopic24152.htm
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 03:45PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month