c++ read each char of string
#include <iostream>
#include <string>
int main() {
std::string str = "Hello, World!";
for (char c : str) {
std::cout << c << std::endl;
}
return 0;
}
#include <iostream>
#include <string>
int main() {
std::string str = "Hello, World!";
for (char c : str) {
std::cout << c << std::endl;
}
return 0;
}