I want to do the coding like enter your user name and password, and then it will tell you succeed or not.
Here is my code:
#include<iostream>
using namespace std;
int main()
{
const int USR = 201910, PSW = 765705590;
int user, psw;
cout << "user:";
cin >> user;
cout << "password:";
cin >> psw;
if(user == USR && psw = PSW) // 2 errors: 1. E1037 expression must be a modifiable lvalue 2. '='left operand must be l-value
{
cout << "welcome to US bank!";
}
else if (user != USR || psw != PSW)
{
cout << "password or username is wrong!";
}
}
I am a comer in C++, could you help me to figure out this two errors? thanks!