So this is part of the code in one of my functions, and whenever I enter either yes, no, or something else, no matter what the response the do loop will loop again. I don't think my "if(response == "yes")" is working. Help please? :D
char response[10];
int answer;
int check;
do
{
printf("\nWould you like you enter different hours? (yes/no)");
scanf("%s", response);
if(response == "yes")
{
answer = 1;
check = 0;
}
else if(response == "no")
{
answer = 0;
check = 0;
}
else
{
check = 1;
}
}
while(check == 1);
return (answer);