string s="zhangzhizhong"; s.assign(s.begin()+2, s.end()-2);
the above code is correct, but what is wirriten in the book is that he iterators can't refer to the container they belong to when container calls assign
Aucun commentaire:
Enregistrer un commentaire