string s = "hello";
for (auto it = s.end() - 1; it >= s.begin(); --it) {
cout << *it;
}
用 str.rbegin()
string s = "hello";
for (auto it = s.rbegin(); it != s.rend();++it) {
cout << *it;
}
string s = "hello";
for (auto it = s.end() - 1; it >= s.begin(); --it) {
cout << *it;
}
用 str.rbegin()
string s = "hello";
for (auto it = s.rbegin(); it != s.rend();++it) {
cout << *it;
}