A better alternative to system("pause")

CMPC :: Computing :: Programming :: C++

Go down

A better alternative to system("pause")

Post by Admin on Mon Jan 04, 2010 1:15 pm

Code:
#include <iostream>
using namespace std;

void wait()
{
    cout<<"\nPress Enter to continue.\n";
    cout<<">";//just to let the user know he needs to type something
    cin.ignore(1);//gets 1 character input and ignores it.
}

avatar
Admin
Pirate King

Posts : 559

Back to top Go down

Re: A better alternative to system("pause")

Post by Unchained on Tue Jan 05, 2010 1:29 am

Dumbass.

Code:
cin.get();
avatar
Unchained
Mod

Posts : 448

Back to top Go down

Re: A better alternative to system("pause")

Post by Admin on Tue Jan 05, 2010 4:04 am

still works. dumbass

_________________
avatar
Admin
Pirate King

Posts : 559

Back to top Go down

Re: A better alternative to system("pause")

Post by Paul on Mon Jan 18, 2010 10:40 pm

Not ALL users will understand that '>' means type something.
avatar
Paul
Pickaxe

Posts : 611

Back to top Go down

Re: A better alternative to system("pause")

Post by Admin on Fri Feb 26, 2010 2:26 am

Paul wrote:Not ALL users will understand that '>' means type something.
That's the portion of users we call "retarded".

_________________
avatar
Admin
Pirate King

Posts : 559

Back to top Go down

Re: A better alternative to system("pause")

Post by Corey on Fri Feb 26, 2010 3:06 am

Admin wrote:
Paul wrote:Not ALL users will understand that '>' means type something.
That's the portion of users we call "retarded".

Who are the majority of commercial software users.

_________________
-Corey Hoard

(Yes, I totally copied Paul's avatar. Or, at least attempted to.)
avatar
Corey
Mod

Posts : 462

Back to top Go down

Re: A better alternative to system("pause")

Post by Unchained on Fri Feb 26, 2010 9:00 am

Most software users refuse to use anything that is command line in the first place.
avatar
Unchained
Mod

Posts : 448

Back to top Go down

Re: A better alternative to system("pause")

Post by Lunsfordium on Tue Aug 10, 2010 5:01 am

doesn't that like completely max out your cpu for the time that it runs?
avatar
Lunsfordium
[Blankie]

Posts : 194

Back to top Go down

Re: A better alternative to system("pause")

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

CMPC :: Computing :: Programming :: C++

 
Permissions in this forum:
You cannot reply to topics in this forum