遍历字符串

string str;
int l = str.length();
for(int i = 0 ;i < l ;i++)
cout << str[i];

原文地址:https://www.cnblogs.com/zhoumin6012/p/10474595.html