The blank is a separator for
cin
so, if the user enters (correctly) 'Pretty BOY', the variable
input
would be assigned with 'Pretty'. You may fix it reading the whole line:
#include<iostream>
using namespace std;
int main ()
{
string password = "Pretty BOY";
string input;
cout<<"Input password: ";
getline(cin, input);
if (input == password)
{
cout<<"Access Granted.\n";
}
else
{
cout<<"Access Denied, incorrect password.\n";
}
}