Answers for "how to traverse a string as words c++"

C++
1

traverse through a string cpp

void print(const std::string &s)
{
    for (std::string::size_type i = 0; i < s.size(); i++) {
        std::cout << s[i] << ' ';
    }
}
Posted by: Guest on August-17-2021

Code answers related to "how to traverse a string as words c++"

Browse Popular Code Answers by Language