I wanna create a password for my code so when you type it you keep going and if its wrong it says "incorrect". I wanna do this for three thing...
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
int main(void) {
cout << "Loading..." << endl;
Sleep(3000);
string password;
cout << "Please enter Primary password" << endl;
getline (cin, password);
if(password == "1")
{
string answer;
system("CLS");
}
cout << "Checking... " << endl;
Sleep(2000);
cout << "Please enter secondary password..." << endl;
getline (cin, password);
if(password == "2")
{
string answer;
system("CLS");
}
cout << "Password Accepted!" << endl;
Sleep(5000);
}
if(password == "1234")
{
string answer;
system("CLS");
}
cout << " Nice job getting this far..." << endl;
Sleep(2000);
cout << " One more thing before opening..." << endl;
Sleep(2000);
cout << " Que es el nombre de mi perro? " << endl;
getline (cin, password);
if(password == "shadow")
{
string answer;
system("CLS");
}
cout << " Only one person should have gotten this far... " << endl;
Sleep(2000);
All help would be appreciated