Hi,
Code:
#include<iostream.h>
#include<conio.h>
#include<string.h>
class password
{
int main(void)
{
beginning:
system("CLS");
system("TITLE Enter Password");
string password;
string playgames;
cout<< "LOGON: ";
cin>> password;
if (password == "passwordhere")
{
system("TITLE Welcome");
system("CLS");
cout << "Welcome, master HAXIFIX" << endl;
system("PAUSE");
goto playgames;
}
else
{
cout << "Incorrect Username" << endl;
cout << "-- CONNECTION TERMINATED --" << endl;
system("PAUSE");
goto exit;
}
exit:
return 0;
goto playgames:
system("CLS");
system("TITLE Hello, Mr. HAXIFIX");
cout << "Would you like to play a game?" << endl;
cout << "Answer: ";
cin >> playgames;
if (playgames == "Yes" || playgames == "yes"){
whatgame;
}
else
{
cout << "Ok, I will ask later." << endl;
system("PAUSE");
playgames;
}
whatgame:
system("PAUSE");
return 0;
};