traverse through a string cpp

Solutions on MaxInterview for traverse through a string cpp by the best coders in the world

showing results for - "traverse through a string cpp"
Taina
06 Oct 2020
1
2void print(const std::string &s)
3{
4    for (std::string::size_type i = 0; i < s.size(); i++) {
5        std::cout << s[i] << ' ';
6    }
7}