Hey, i made this password program but i am having trouble getting it to work. the last thing i need to do it be able to compare the inputed password to the actual password (in this program i want it to be "matt") im not sure how i do this, could someone help? with this code i get undefined symbol 'matt' when i try to compile with borland. i know why i just dont know how to fix it :S
Code:
//Passwod Program
//By Matt
#include <iostream>
using namespace std;
int main() {
char password[5];
start:
cout<<"* * * * * * * * * * * * * \n";
cout<<" Please enter your PIN \n";
cout<<"------- 4 letters ------ \n";
cout<<"* * * * * * * * * * * * * \n";
cin.getline (password, 5, '\n' );
if(password == matt ) {
cout<<"Thank You! \n";
}
else {
cout<<"Sorry Incorrect PIN \n";
goto start;
}
}