Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to iterate throguh a string in c++

void print(const std::string &s)
{
    for (std::string::size_type i = 0; i < s.size(); i++) {
        std::cout << s[i] << ' ';
    }
}
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #iterate #throguh #string
ADD COMMENT
Topic
Name
1+3 =