Okay i am trying to make a lock
this is my code:
#include <iostream>
using namespace std;
int main ()
{
char key [10]="abcd";
char answer[10];
cout<< "password:";
cin >> answer;
if( key == answer)
cout << "correct";
else
cout << "incorrect";
return main();
}
when ever i try to run it, it keeps saying incorrect for everything, even when i type in the correct password.