Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

Reply
 
Thread Tools Display Modes
Old 16-11-2008, 06:06 AM   #11
_r.u.s.s.
I'm not Russ
but an ex-alektorophobic
 
_r.u.s.s.'s Avatar


 
Join Date: May 2005
Location: Nitra, Slovakia
Posts: 6,533
Default

sorry i was quite sh*tfaced yesterday when i wrote that. do it, you won't lose anything from trying

why won't you search for the program name, to see where it has been compiled? (i never worked in devc++) then you will be able to run the program via running cmd, so it doesn't close automatically

i think there were also options about this closing cmd after program in windows
__________________
_r.u.s.s. is offline                         Send a private message to _r.u.s.s.
Reply With Quote
Old 17-11-2008, 06:44 AM   #12
AlumiuN
Vodka-Induced Entertainment
 
AlumiuN's Avatar

 
Join Date: Jan 2008
Location: Christchurch, New Zealand
Posts: 1,044
Default

I think it just compiles it to the memory and runs it from there. You need to build it to create an EXE.
__________________


Lies are for those who cannot handle the truth, but truth is for those who cannot handle the lies.
AlumiuN is offline                         Send a private message to AlumiuN
Reply With Quote
Old 28-11-2008, 06:53 AM   #13
sofl
Newbie

 
Join Date: Jun 2008
Location: Dresden, Germany
Posts: 4
Default

Quote:
Originally Posted by Fubb View Post
using DevC++, i put the .cpp file in, and said compile, and it said it did, but to where did it compile? And when i clicked "run", the command prompt would open for like 1/8th of a second then close. Hm

ANYWAYs, while i figure this out, ima also make more codes.
You need a wait command like system("pause");
sofl is offline                         Send a private message to sofl
Reply With Quote
Old 29-11-2008, 07:55 AM   #14
AlumiuN
Vodka-Induced Entertainment
 
AlumiuN's Avatar

 
Join Date: Jan 2008
Location: Christchurch, New Zealand
Posts: 1,044
Default

Quote:
Originally Posted by sofl View Post
You need a wait command like system("pause");
Exactly what I said just after he had that problem.
__________________


Lies are for those who cannot handle the truth, but truth is for those who cannot handle the lies.
AlumiuN is offline                         Send a private message to AlumiuN
Reply With Quote
Old 17-12-2008, 11:00 AM   #15
sofl
Newbie

 
Join Date: Jun 2008
Location: Dresden, Germany
Posts: 4
Default

Quote:
Originally Posted by AlumiuN View Post
Exactly what I said just after he had that problem.
oh sorry i've seen it too late
sofl is offline                         Send a private message to sofl
Reply With Quote
Old 19-12-2008, 02:26 PM   #16
gamers2k
Newbie

 
Join Date: Dec 2008
Location: Alsasua, Spain
Posts: 9
Default

Quick thought, why not get yourself visual studio - might save you time setting up your compiler and all.
gamers2k is offline                         Send a private message to gamers2k
Reply With Quote
Old 21-12-2008, 05:23 PM   #17
The Bard
Abandonia Bard
 
The Bard's Avatar


 
Join Date: Feb 2006
Location: Velika Gorica, Croatia
Posts: 117
Default

I think that #include<cstdlib> is better for C++ if you're using system() order.
Or you can do the old trick with
char z;
cin >> z;
on the end of the program, you can probably guess how that one works...
The Bard is offline                         Send a private message to The Bard
Reply With Quote
Old 21-12-2008, 09:51 PM   #18
AlumiuN
Vodka-Induced Entertainment
 
AlumiuN's Avatar

 
Join Date: Jan 2008
Location: Christchurch, New Zealand
Posts: 1,044
Default

Quote:
Originally Posted by The Bard View Post
Or you can do the old trick with
char z;
cin >> z;
on the end of the program, you can probably guess how that one works...
Very cunning... although, if you really want to, you could add:

cout << "Press enter to continue..."
__________________


Lies are for those who cannot handle the truth, but truth is for those who cannot handle the lies.
AlumiuN is offline                         Send a private message to AlumiuN
Reply With Quote
Old 24-12-2008, 10:06 PM   #19
sofl
Newbie

 
Join Date: Jun 2008
Location: Dresden, Germany
Posts: 4
Default

you can also use the getch() function

#include <conio.h>

int main()
{
...
cout<<"press any key";
getch();
return 0;
}
sofl is offline                         Send a private message to sofl
Reply With Quote
Old 15-04-2009, 05:31 PM   #20
devilisme
Newbie

 
Join Date: Apr 2009
Location: Selangor, Malaysia
Posts: 8
Default

you can also use
...
cin.get();
return 0;
}

that did the work for me..
devilisme is offline                         Send a private message to devilisme
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Discworld & Fable halp! Fubb Troubleshooting 5 30-05-2008 08:26 AM
Halp! Marvin Old Suggestions 11 14-12-2007 08:45 PM


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 06:03 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.