title: C "comparison between pointer and integer" warning for menu
body: <p>I'm trying to write a program that involves comparing chars as part of a menu system for a program that decodes resistor codes. At the end of the menu it asks if you want to decode another resistor, repeating the program if the user selects "yes".</p>
  
  <p>This is the code I have so far:</p>
  
  <pre><code>  //used for repeating input menu
    int menu = 0;
    char menuChoice = 0;
  
    //rest of program goes here      
  
    printf("Do you want to decode another resistor? (y/n)");
    scanf("%c", &amp;menuChoice);
  
    while(menuChoice != "y" &amp;&amp; menuChoice != "Y" &amp;&amp; menuChoice != "n" &amp;&amp; menuChoice != "N")
    {
      if(menuChoice != "Y" &amp;&amp; menuChoice != "y")
      {
        if(menuChoice == "N" || menuChoice == "n")
        {
          menu = 0;
        }
  
        else
        {
          printf("Invalid choice.");
        }
      }
    }
  </code></pre>
  
  <p>When I try to compile with GCC, I end up with a warning that says "comparison between pointer and integer." Since scanf only accepts a pointer, I don't know how exactly to compare the scanned char with to "Y" or "n". Is there something I'm missing here?</p>