title: Error: operand types are incompatible ("int" and "const char*") c++
body: <p>This is my code, the error is as displayed in the title. And in the compiler: </p>
  
  <pre><code>1&gt;c:\users\ägaren\documents\visual studio 2010\projects\yt tutorial hd\yt tutorial hd\main.cpp(26): error C2446: '==' : no conversion from 'const char *' to 'int'
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>1&gt;c:\users\ägaren\documents\visual studio 2010\projects\yt tutorial   hd\yt tutorial hd\main.cpp(26): error C2040: '==' : 'int' differs in levels of       indirection from 'const char [4]'
  </code></pre>
  
  
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;windows.h&gt;
  #include &lt;string&gt; 
  using namespace std;
  
  
  int main()
  {
     int gold=600, level=1, exp, damage=10, health=100, mana=100, manaLevel=1;          // Main Vars      
     string name;
     cout &lt;&lt; "Hello, what is your name?: ";
     cin &gt;&gt; name; 
     cout &lt;&lt; "Welcome " &lt;&lt; name &lt;&lt; " to the field of war,\nYou will stumble upon many other brave warriors.\nTake care and good luck.\n";
     Sleep(500);
  
     cout &lt;&lt; "You're first task is to eliminate the Orc leader.\n";
     int orc=15, troll=25, mage=50; // Enemy Vars
     int healthpotion=25, manaPotion=25; // Potions vars
     int ifAttack; // if the user chooses to attack or not.
     Sleep(500);
     cout &lt;&lt; "Tossan: " &lt;&lt; name &lt;&lt; " I hereby order you to attack the orc, he is up north.\nThis message will delete in 2.5 seconds.";
     Sleep(2500);
     system("cls"); // 1st screen clear.
     cout &lt;&lt; "After heading north you stumble upon the Orc, will you attack him? [y/n]\n";
     cin &gt;&gt; ifAttack;
     if (ifAttack == "yes")
  
  }
  </code></pre>
  
  <p>the if (ifAttack == "yes")
  is what is giving me the erros, == is underlined but i cant find how to fix it. c++</p>