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 


Help with C++

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

Joined: 21 Jan 2008
Posts: 97

PostPosted: Thu Aug 07, 2008 2:12 pm    Post subject: Help with C++ Reply with quote

k well whenever i run C++ Express Edition 2008 and i write/code for something in a .cpp file or any other, something always happen. As soon as i press F5 to run the file, it closes out automatically right after it has been open and i can't see what's in it. The only way for me to keep it open is if i put system ("pause"). I was wondering if i could run the file without having to put system ("pause"). If i could, can sum1 please tell me how? well thanks!
Back to top
View user's profile Send private message
Typhoon808
Expert Cheater
Reputation: 0

Joined: 27 Mar 2008
Posts: 175
Location: Wales

PostPosted: Thu Aug 07, 2008 2:30 pm    Post subject: Reply with quote

Quote from Wiccaan:

Quote:

std::cin.sync();
std::cin.ignore();


To pause.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Aug 07, 2008 2:34 pm    Post subject: Reply with quote

I prefer:

Code:

cin.sync();
cin.get();

//if you're not using the standard namespace

std::cin.sync();
std::cin.get();


And for future reference it is best to not use system().

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
disistommy
Advanced Cheater
Reputation: 0

Joined: 21 Jan 2008
Posts: 97

PostPosted: Thu Aug 07, 2008 2:35 pm    Post subject: Reply with quote

k thanks
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Aug 07, 2008 3:37 pm    Post subject: Reply with quote

Code:
system("pause");


Yes, I know this takes more resources, but it is only 1 line. I am a very lazy person.

_________________
What dosen't kill you, usually does the second time.
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