This is my program:
However, when run on Quincy 2000 I receive errors, and my first two "If" statements do not work. Everytime I type in a name, it automatically goes to the third if statement.Code:#include <stdio.h> void main() { char love[20]; printf("Insert the name of the person that you love. \n"); gets(love); if(love == "Lisa") { printf("\n Wonderful, because %s loves you too!", love); } else if(love == "Alex") { printf("\n Wonderful, because %s loves you too!", love); } else { printf("\n Error! \n You do not love %s.", love); } }
Also, my error says something about "the return value for main is not int". But I don't have a return value, nor do I have any integers.
What is the problem?
Thank you.