title: Comparing strings C++
body: <pre><code>string Foo(string letter)
   {
  
  
        for (int j = 0; j &lt; (int)alphabet.length(); j++)
       {
  
              if (letter[0] == (alphabet[j]));
                   return "SUCCESS";
        }
  
        return "FAILURE";
  
  
   }
  
  alphabet = "Test";
  
  cout &lt;&lt; Foo("f") &lt;&lt; endl;
  </code></pre>
  
  <p>This prints SUCCESS even thought it shouldn't. What's wrong with my comparison operator?? </p>