#include <iostream>
#include <string>
int main() {
string str = "abc";
for (char c : str)
{
cout << c << endl;
}
return 0;
}
/*
输出
a
b
c
*/
#include <iostream>
#include <string>
int main() {
string str = "abc";
for (char c : str)
{
cout << c << endl;
}
return 0;
}
/*
输出
a
b
c
*/