【发布时间】:2013-12-22 09:09:48
【问题描述】:
我不知道是什么原因造成的,但我认为这与 函数“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;
}
【问题讨论】: