Hello guys i need to make a simple log in program that will ask for the user to enter a username and password, and just like a log in program, the entered username and password must be the same with the default username and password in the program. Here is my code,but it looks like it isn't working.
Code:
#include <iostream.h>
#include <conio.h>
char defusername[50]="test",user[50],pass[50];
char defpassword[50]="try";
int main(){
cout<<"Username:";
cin>>user;
if(defusername == user)
cout<<"\nEnter your password:";
cin>>pass;
if(defpassword == pass)
cout<<"\nWelcome GUILDNAME to the Infinity Tower!";
getch();
return 0;
}