Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string password1 = "password";
string password;
cout << "NotFire Private Pass: ";
cin >> password;
if (password != password1)
{
cin.ignore(1024, '\n'); //
cout << "Press enter to exit...\n"; // This is System("Pause") alternative
cin.get(); //
return 0; // you can use exit(0) if you want here
}
cout << "Hello!\n";
cin.ignore(1024, '\n');
cout << "Press enter to continue...\n";
cin.get();
// Here goes your other code... threads and etc.
}
P.M me if you want me to explain something, I tested the code and it works fine