title: Comparison between pointer and integer C++ forbidden
body: <p>Hey so i'm still learning C++ and i've ran into a snag while compiling this part of my code. Before i go any further with the text game that I'm developing for a project i'd like to know why I am getting this error when attempting to compile so I can debug as I develop.</p>
  
  <blockquote>
    <p>ISO C++ forbids comparison between pointer and integer [-fpermissive] if (answer1 == 'Yes' &amp;&amp; answer1 == 'yes) {</p>
  </blockquote>
  
  <p>I'm not exactly sure where i am going wrong because the code is storing the result as "Yes". (I checked by adding a std::cout >> answer1; after gathering the users y/n answer.)</p>
  
  <p>but when i try to check that with the If statement i get this error.</p>
  
  <pre><code>    #include &lt;iostream&gt;
  
  int main() {
  
    char name[50];
    char answer1[50];
  
    std::cout &lt;&lt; "Ahh... Welcome newcomer. What is your name?\n";
    std::cin &gt;&gt; name;
    std::cout &lt;&lt; "You said your name was " &lt;&lt; name &lt;&lt; " correct?\n";
    std::cin &gt;&gt; answer1;
  
      // Let the game begin!
  
    if (answer1 == 'Yes' &amp;&amp; answer1 == 'yes') {
  
      std::cout &lt;&lt; "Lets get this game started then!\n";
  
    }
    else {
  
      std::cout &lt;&lt; "Then why are you even wasting my time?\n";
    }
  
  }
  </code></pre>
  
  <p>I know it's basic and rudimentary but I am still learning (self-taught, too). Thanks for reading.</p>