std::string str = ???; for(std::string::iterator it = str.begin(); it != str.end(); ++it) { do_things_with(*it); }
// C++11 for(char& c : str) { do_things_with(c); }