i need your help :(

hi we have this homework which involves an input of a username and password. i figured i should use string because there are letters involved. i was playing around the commands to try and figure out how to work out my homework.my question is, how do i get this part to work, because my conditional statements doesnt seem to work. here's my program. it's supposed to print "2" when i input the correct username. but it doesnt seem to enter the if statement

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
#define p printf
#define s scanf



main(){

char pin[5]="1234",user[20]="divina",npin[5],npin2[5],iuser[20],ipin[5];
float wdraw,bal=5000,dep;

p("Welcome to the ATM program.");
p("\nPlease enter your username and password.");
p("\nusername: ");
s("%s",&iuser);
if(iuser==user){
p("2");
}

getch();
}
You need to use strcmp() to compare strings.
Topic archived. No new replies allowed.