我不知道是什么原因造成的,但我认为它与函数“password_checker”有关??
这是我的代码:
#include <iostream>
#include <Windows.h>
#include <string>
using namespace std;
string password_checker();
int main()
{
string password;
cout << "please enter your password: " << endl;
cin >> password;
if (password == password_checker)
{
cout << "Access granted" << endl;
}
else if (password == password_checker)
{
cout << "Access denied" << endl;
}
Sleep(15000);
return 0;
}
string password_checker()
{
string password = "123456";
return password;
}