vector<string> split ( const string& str ) // const-correct { vector<string> ret; typedef string::const_iterator iter ; iter i = str.begin() ; // ... return ret; }