#include <iostream>
std::string FirstReverse(std::string str) {
std::string newstring;
for(auto it = str.cend()-1; it != str.cbegin()-1; --it){
newstring += *it;
}
return newstring;
}
int main() {
std::string str = "Argument goes here";
std::cout << FirstReverse(str)<<std::endl;
return 0;
}
C++ 字符串逆序输出
最新推荐文章于 2024-07-04 00:53:48 发布