password input

Pages: 12
ok sweet :))) I started using Xcode for mac, and it's working nice :)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <cstdlib>
#include <iostream>
using namespace std;

const char *mypass="pass";

int main()
{
	char *password=getpass("Enter password: ");
	
	if(strcmp(password,mypass)==0) cout <<"Correct password!\n";
	else cout <<"Incorrect password!\n";
	
	
	return 0;
}

but :D as I run it, this is an output:
1
2
3
Enter password: 
Correct password!
logout

So my question is: Can I somehow eliminate writing this "logout"?

EDIT: Figured it :)
Last edited on
Topic archived. No new replies allowed.
Pages: 12