Possible Duplicate:
How do I properly compare strings in C?
Although I've been sitting on this topic for months, I'm relatively new to C. I'm trying to write a simple question/response program. I know it has something to do with the if else conditions (everything else works), but I've searched and can't seem to find the problem. There's also the recursion at the end that repeats the program. The function call that I put inside of it might be wrong.
#include <stdio.h>
main()
{
char line[100];
char decision[100];
printf("Are you gonna throw it?\n");
printf("Type yes or no.\n");
scanf("%s", line);
printf("%s \n", line);
if (line == "yes") {
printf("Thanks.\n");
} else if (line == "no") {
printf("Why not?\n");
}
printf("Do you want to do this again?\n");
scanf("%s", decision);
if (decision == "yes") {
main();
};
}