View Single Post
  #1 (permalink)  
Old January 18th, 2007, 12:12 AM
mastrgamr mastrgamr is offline
Authorized User
 
Join Date: Oct 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mastrgamr
Default use enter key to exit

how do i use the entee button to exit a program, lookie here:

#include <iostream.h>
using namespace std;

int main() {
    unsigned char x[9];
    cout<<"Input an 8 letter or less password: ";
    cin>>x;
    cout<<"Your password was: "<<x<<"\n";

cin.get(); <-----------------|
                             |
return 0; |
} |
                             |
i thought that would do it!. |
y not? ----------------------|

isnt cin.get() supposed to do it?:(

Mŧ~|~®GÃ(v)R~
__________________
-Stuart Smith
Reply With Quote