Entering specific data
Ok newbie here. I got a question. I'm trying to write a program that reads a string from someone and gives an if-then-else result. Here's what I've done, can someone point out what I'm doing wrong?
Of corse this isn't where the code stops, but this is where my problems are coming in.
char name; //input variable
char f; //input variable
char lname; //input variable
char mname; //input variable
printf ("What is your First Name?");
if (f=="fantim") || (f == "Fantim") || (f == "FANTIM"))
printf ("What is your middle name?");
scanf ("%d", &mname);
if ((mname == "mi") || (mname == "Mi") || (mname =="MI"))
printf ("What is your last name?");
scanf ("%d", &lname);
1) void main is not valid. Please check the FAQ for details
2) You can't compare a single character to a string literal.
3) Fix your indentation