后置自增操作符号哪里使用错了。
程序代码:
#include<iostream> #include<string> #include<vector> using namespace::std; int main(){ vector<string*>vec; string str; cout<<"Enter some string ,"<<endl; while(cin>>str){ string *st= new string; *st=str; vec.push_back(st); } vector<string*>::iterator iter=vec.begin(); while(iter!=vec.end()){ cout<<**iter++<<" "<<(**iter++).size()<<endl; ; } while(iter!=vec.end()){ delete *iter++; } return 0; }