for(auto x:s) cout<<x; for(auto it=str.begin();it!=str.end();it++) cout<<*it; for(string::iterator it=s.begin();it!=s.end();it++) cout<<*it;