小工具知识网

当前位置: 首页 > 行业知识 > 5.27作业

行业知识

5.27作业

2026-10-26 03:42:34 来源:互联网转载
  1. 定义自己的命名空间my_sapce,在my_sapce中定义string类型的变量s1,再定义一个函数完成对字符串的逆置。

 

#include #include using namespace std;namespace my_space{    string s1;    void RevString(string &s1);}void my_space::RevString(string &s1){    int i = 0;    int j = s1.size()-1;    while(i

上一篇:服务器怎么装架子的?

下一篇:抖音宣传服务器怎么设置?