Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


c++ halp

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
teeigeryuh
Master Cheater
Reputation: 25

Joined: 13 Oct 2008
Posts: 262
Location: The netherlands

PostPosted: Sun Jul 29, 2012 8:00 am    Post subject: c++ halp Reply with quote

How can i make a program/app stay open after running it? I just open my basic proggy (a lame calculator) but right after finishing it closes by it self.
Back to top
View user's profile Send private message
Aniblaze
Grandmaster Cheater Supreme
Reputation: 138

Joined: 23 Apr 2006
Posts: 1757
Location: The Netherlands

PostPosted: Sun Jul 29, 2012 10:58 am    Post subject: Reply with quote

I think you want "system("pause");" at the end of the main function.
Back to top
View user's profile Send private message
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Sun Jul 29, 2012 11:00 am    Post subject: Reply with quote

Aniblaze wrote:
I think you want "system("pause");" at the end of the main function.

system("PAUSE") is a really bad practice.

If my memory serves me right, just do
Code:
cin.get();
Back to top
View user's profile Send private message Send e-mail
potaters
Grandmaster Cheater
Reputation: 72

Joined: 13 Apr 2009
Posts: 969

PostPosted: Sun Jul 29, 2012 12:43 pm    Post subject: Reply with quote

I used to basically do what blablfy said but like cin << wait;
Press any key to close type deal.
Back to top
View user's profile Send private message
coolman++
Advanced Cheater
Reputation: -1

Joined: 19 Jul 2012
Posts: 79
Location: Saudi Arabia

PostPosted: Sun Jul 29, 2012 1:00 pm    Post subject: Reply with quote

yup. cin response works as well.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
teeigeryuh
Master Cheater
Reputation: 25

Joined: 13 Oct 2008
Posts: 262
Location: The netherlands

PostPosted: Sun Jul 29, 2012 1:01 pm    Post subject: Reply with quote

blablfy's suggestion didn't work.

However

#include <conio.h>

getch ();
worked.
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sun Jul 29, 2012 1:22 pm    Post subject: Reply with quote

deppends if you want an static wait or being able to do stuf
example when using DirectX or OpenGL you gotta do an infinite loop on the main program in order to refresh frames on your stage.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites