title: isalpha() function returns false for character in string
body: <p>I am trying to count the number of letters in a string by checking for every character in the string <code>foo</code>by using the pre-defined function <code>isalpha()</code></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cstdlib&gt;
  
  using namespace std;
  
  
  int main()
  {
      string foo = "aaaaaaa1";
  
      int count=0;
  
      for (int i=0;i&lt;foo.length();i++)
      {
          if ( isalpha(foo[i]) == true)
          {
              count++;
          }
      }
  
      cout&lt;&lt;count;
  
      system("PAUSE");
  }
  </code></pre>
  
  <p>Expected output :</p>
  
  <blockquote>
    <p>7</p>
  </blockquote>
  
  <p>Current output :</p>
  
  <blockquote>
    <p>0</p>
  </blockquote>
  
  <p>The error is that <code>function isalpha is not returning true for alphabetic</code> , </p>
  
  <p>Can someone explain to me why and how to solve the problem to check if a given character is a alphabetic</p>