16 lines
347 B
C++
16 lines
347 B
C++
// 【场景】字符串反转
|
||
// 编写一个函数 reverseString,接受一个字符串作为参数,并返回该字符串的反转版本。
|
||
#include <bits/stdc++.h>
|
||
|
||
using namespace std;
|
||
|
||
string reverseString(string &other)
|
||
{
|
||
}
|
||
|
||
int main()
|
||
{
|
||
cout << "反转后的字符串 hello 为: " << reverseString("hello") << endl;
|
||
return 0;
|
||
}
|