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 


Question About C++

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
1033430
Expert Cheater
Reputation: 0

Joined: 19 Mar 2007
Posts: 159
Location: Learning C++

PostPosted: Wed Oct 08, 2008 2:32 pm    Post subject: Question About C++ Reply with quote

So after I compile then run the file, I find it appearing then disappearing a split second after. I'm using Dev-C++ right now. I do have Visual C++ right now but I'm starting out with Dev-C++.
Any help would be much appreciated.

_________________
"Lifes a Bitch, because if it were a Slut, it would be to easy"
-Unknown
Back to top
View user's profile Send private message AIM Address
Zerith
Master Cheater
Reputation: 1

Joined: 07 Oct 2007
Posts: 468

PostPosted: Wed Oct 08, 2008 2:40 pm    Post subject: Reply with quote

This question has been asked thousands of times on this forum and others,
why would the program have ANY reason at all to pause at the end of the program if you do not instruct it to?

add these two lines at the end of the main function:

Code:

cin.sync();
cin.ignore();
Back to top
View user's profile Send private message MSN Messenger
1033430
Expert Cheater
Reputation: 0

Joined: 19 Mar 2007
Posts: 159
Location: Learning C++

PostPosted: Wed Oct 08, 2008 2:48 pm    Post subject: Reply with quote

Thankyou. I think I have actually read about it. Can you also use
...(PAUSE);
or something in that area?
JW. I just started like 2 days ago.

_________________
"Lifes a Bitch, because if it were a Slut, it would be to easy"
-Unknown
Back to top
View user's profile Send private message AIM Address
Zerith
Master Cheater
Reputation: 1

Joined: 07 Oct 2007
Posts: 468

PostPosted: Wed Oct 08, 2008 2:49 pm    Post subject: Reply with quote

You can, but never use system("pause"), ever.
Back to top
View user's profile Send private message MSN Messenger
1033430
Expert Cheater
Reputation: 0

Joined: 19 Mar 2007
Posts: 159
Location: Learning C++

PostPosted: Wed Oct 08, 2008 2:51 pm    Post subject: Reply with quote

K thank you so much. I couldn't even get a glimpse at my work w/o that lol
_________________
"Lifes a Bitch, because if it were a Slut, it would be to easy"
-Unknown
Back to top
View user's profile Send private message AIM Address
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Wed Oct 08, 2008 4:35 pm    Post subject: Reply with quote

getchar();
Back to top
View user's profile Send private message
dEEznutz
Grandmaster Cheater
Reputation: 0

Joined: 29 Nov 2007
Posts: 514

PostPosted: Wed Oct 08, 2008 5:52 pm    Post subject: Reply with quote

cin.get();
_________________
Learning C++
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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