Strings In Depth4 / 15
Up next

Iterate characters

#include <print>
#include <string>

int main() {
    std::string s = "abc";
    for (char c : s) {
        std::println("{}", c);
    }
}
What you're solving

range-for over the chars