I'm a student(newbie) and everything I've learned, I just applied here but string isn't clearly explained by our instructor. So I'm having problem with this code it doesn't accept the if else if and jumps on else. I'm using Turbo C++. I'm wondering what is wrong with here, since I'm totally newbie with these. Thank you in advance
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
void main()
{
clrscr();
char user[50],pass[50];
cout<< "Username: ";
gets(user);
cout<< "Password: ";
gets(pass);
if (user=="user" && pass=="pass"){
cout<< "ACCESS GRANTED";
}else if (user=="user"){
cout<< "Wrong Password";
}else if (pass=="pass"){
cout<< "Wrong Username";
}else
cout<< "Wrong Username and Password";
getch();
}