I want this code to:
IF unsaved packets is greater or = 1,
then
print "There are unsaved packets"
      "Would you like to saved them?"
      "Type Y for Yes or N for No"
Get user input
      IF User input = Y then function save
 ELSE IF User input = N then exit
      ELSE Return to menue
here is my current code, the problem is it won't take the input at all and if it does it doesn't use it to determine what happens after.
if(unsavedPackets >= 1)
{
    puts("There are currently unsaved packets in the memory");
    puts("\nWould you like to save them?");
    puts("\nType Y for Yes or N for No");
    getch(saveChoice);
    printf("%c", saveChoice);
    if(saveChoice == "Y")
    {
        puts("Saving records");
        save(recordCount, records);
        exit(1);
    }
    else if(saveChoice == "N")
    {
        exit(1);
    }
    else
    {
        printf("Returning to main menu");
    }
}
break;
				
                        
One problem is that
where you should write
Similarly for "N"
In the first case, you are comparing
charwithconst char *where second is pointer, not a character.Your
breakstatement will always be executed no matterifcondition is true or false.