代码没有连续性
//C++map定义,迭代器定义
map<char, int> pi_n;
map<char, int>::iterator it ;
//map访问
cout << it->first << "-" << it->second << endl;
// find 返回迭代器指向当前查找元素的位置否则返回map::end()位置
iter = mapStudent.find("123");
if(iter != mapStudent.end())
cout<<"Find, the value is"<<iter->second<<endl;
else
cout<<"Do not Find"<<endl;
it = pi_n.find(s[i]);
if (it != pi_n.end())
pi_n[s[i]] = i;
//字符串子串的获取,第一个是字符串s的起始位置,第二个参数是字符的个数
s.substr(star,n);