读入一段文本到 vector 对象,每个单词存储为 vector 中的一个元素。把 vector 对象中每个单词转化为小写,该如何解决

读入一段文本到 vector 对象,每个单词存储为 vector 中的一个元素。把 vector 对象中每个单词转化为小写
#include <iostream>
#include <string>
#include <vector>
using std::vector;
using std::string;
using std::cout;
using std::cin;
using std::endl;
int main()
{
    vector<string> svec;
    string word;
   while (cin>>word) 
    svec.push_back(word); 
    for (vector<string>::size_type ix=0;ix!=svec.size();++ix)
   {
        for (string::size_type index=0;index!=svec[ix].size();++index)     //注: svec[ix].size()返回类型为 string::size_type 
       {
           svec[ix][index]=tolower(svec[ix][index]);
        }
     }
    for (vector<string>::size_type ix=0;ix!=svec.size();++ix)      
    {
        cout<<svec[ix]<<' ';
        if ((ix+1)%8==0)
       {
            cout<<endl;
       }
    }
    getchar();
    return 0;
}
这代码里面的  for (string::size_type index=0;index!=svec[ix].size();++index)  。第二个for循环什么用为什么不直接用第一个for循环 替换大小写呢。。。诶求各种喷!我只想高明白。关键说明清楚!!
------解决思路----------------------
第一个循环是读取每个单词,第二个就是每个单词里的字母。
------解决思路----------------------
去查一下tolower这个的参数你就知道为什么了,它只处理字符,不直接处理字符串
------解决思路----------------------
第二个循环是按字符操作的
你也可以只用第一个循环 操作字符串 
strlwr 用这个是操作字符串的,可以试一下。。