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

Join 149,459 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,127 people online right now. Registration is fast and FREE... Join Now!




performance of cin.get() versus system("PAUSE")

 
Reply to this topicStart new topic

performance of cin.get() versus system("PAUSE")

scottyadam
21 Jan, 2008 - 05:29 PM
Post #1

New D.I.C Head
*

Joined: 3 Dec, 2007
Posts: 49


My Contributions
Hi there,

I am new to C++ and have learned some system commands...I saw that in this post that u used (a couple of replies ago)

CODE

cout << "\n\nPress any key to exit program.....";
cin.get();


now I have heard that if you use...

CODE

system("pause");


it is slower on the OS...is this true...which one is better to use?

ADAM SCOTT
User is offlineProfile CardPM
+Quote Post

PennyBoki
RE: Performance Of Cin.get() Versus System("PAUSE")
21 Jan, 2008 - 09:55 PM
Post #2

system("revolution");
Group Icon

Joined: 11 Dec, 2006
Posts: 2,010



Thanked: 7 times
Dream Kudos: 500
Expert In: Java,C++,C

My Contributions
Hi, please check this thread, you may find it useful.

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

Tom9729
RE: Performance Of Cin.get() Versus System("PAUSE")
22 Jan, 2008 - 12:36 PM
Post #3

Debian guru
Group Icon

Joined: 30 Dec, 2007
Posts: 1,582



Thanked: 12 times
Dream Kudos: 325
My Contributions
You're pausing the program. If you're not moving anywhere, does it matter how fast you can go?
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Performance Of Cin.get() Versus System("PAUSE")
22 Jan, 2008 - 12:39 PM
Post #4

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 7,116



Thanked: 76 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
QUOTE(Tom9729 @ 22 Jan, 2008 - 01:36 PM) *

You're pausing the program. If you're not moving anywhere, does it matter how fast you can go?

Not to mention, at 2.4 ghz (for example) is there going to be a human noticeable difference?
User is online!Profile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/7/09 01:45PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

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