title: convert strings to lowercase characters using tolower() function in c++
body: <p>I have a text file called aisha</p>
  
  <pre><code>This is a new file I did it for mediu.
  Its about Removing stopwords fRom the file
  and apply casefolding to it
  I Tried doing that many Times
  and finally now I could do
  </code></pre>
  
  <p>and I did a code to read that text file and save it into an array and then convert some characters to lowrcase
  but what I want is to to make the codes reads the file as a string not char </p>
  
  <pre><code>char myArray[200];
  </code></pre>
  
  <p>to be</p>
  
  <pre><code>`string myArray[200];`
  </code></pre>
  
  <p>I think I can do it using the function <code>tolower()</code>and a string std
  insted that long code I used
  but I dont know how to change my code to a code that uses that functions</p>
  
  <p>my code is</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;fstream&gt;
  #include&lt;ctype.h&gt;
  int main()
  {
      using namespace std;
  
      ifstream file("aisha.txt");
      if(file.is_open())
      {
          file &gt;&gt; std::noskipws;
           char myArray[200];
  
          for(int i = 0; i &lt; 200; ++i)
          {
  
  
              cout&lt;&lt;"i";
              if (myArray[i]=='A')
              cout&lt;&lt;"a";
              if (myArray[i]=='T')
              cout&lt;&lt;"t";
              if (myArray[i]=='R')
              cout&lt;&lt;"r";
              else 
              if (myArray[i]!='I' &amp;&amp; myArray[i]!='T' &amp;&amp; myArray[i]!='R'&amp;&amp; myArray[i]!='A')
              cout&lt;&lt;myArray[i];
              }
           file.close();
  
          }
  
  system("PAUSE");
  return 0;
  }
  </code></pre>
  
  <p>I saw that solution in this site
  but I couldnt apply it to my code</p>
  
  <pre><code>#include &lt;boost/algorithm/string.hpp&gt;    
  
  std::string str = "wHatEver";
  boost::to_lower(str);
  
  Otherwise, you may use std::transform:
  
  std::string str = "wHatEver";
  std::transform(str.begin(), str.end(), str.begin(), ::tolower);
  </code></pre>