C++:vector容器简单使用方法_练习 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>using namespace std ;void ko( vector<…… 题解列表 2025年03月26日 0 点赞 0 评论 121 浏览 评分:0.0
暴力解法--一行代码搞定 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string s; …… 题解列表 2025年03月17日 0 点赞 0 评论 243 浏览 评分:0.0
C++简单解法 摘要:#include#includeusing namespace std;int str(char a[],char b[]){ int i=0,n; n=strle…… 题解列表 2025年02月28日 0 点赞 0 评论 236 浏览 评分:10.0
基于c++string特性的解法,但在vs上测试无问题,在网页验证过不去 摘要:解题思路:利用c++本身的string 的特性,来完成解答c++对于string字符串是允许直接对字符串本身进行用 [ ] 的方式来访问字符串中的 单个字符,因此,我们只需通过string库内自带的…… 题解列表 2024年11月05日 0 点赞 1 评论 245 浏览 评分:9.9
1031: [编程入门]自定义函数之字符串反转 摘要:解题思路:注意事项:参考代码:#include<bits/c++.h>using namespace std;int Reverse(char a[],char b[]){ int i=0,n;…… 题解列表 2024年06月08日 1 点赞 0 评论 420 浏览 评分:9.9
用stl超级简单 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string a,b; cin>>a,b; reverse(…… 题解列表 2024年04月03日 0 点赞 0 评论 214 浏览 评分:0.0
题解 1031: [编程入门]自定义函数之字符串反转 摘要:###思路 逆序输出即可 ###注意事项 要写`for(int i=l-1;i>=0;i--)` 1.逆序 2.***l-1*** ###代码 ```cpp #include usi…… 题解列表 2024年02月06日 0 点赞 0 评论 284 浏览 评分:9.9
四种方法求解字符串反转 摘要:解题思路:关于sizeof(),strlen(),length(),size()char a[100]:定义一个字符数组(使用sizeof和strlen时需要用char定义字符数组)cin>>a;用于…… 题解列表 2024年01月19日 0 点赞 0 评论 145 浏览 评分:0.0
利用指针解决字符数组 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string str; g…… 题解列表 2023年12月26日 0 点赞 0 评论 142 浏览 评分:0.0
c++指针法(指针练习) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ char arr[100]; cin.getline(arr,100…… 题解列表 2023年12月14日 0 点赞 0 评论 173 浏览 评分:0.0