![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++基础
圣托里尼的日落啊~
这个作者很懒,什么都没留下…
展开
-
二维vector的使用
#include <iostream>#include <vector>using namespace std;vector<vector<int>> v;int main(){ for (int i = 1; i < 3; i++) { v.push_back(vector<int>(i,...原创 2019-04-28 18:39:36 · 258 阅读 · 0 评论 -
c++字符串删除所有指定字符
#include <iostream>#include <string.h>using namespace std;int main(){ string s = "-daas-j--kdj-al-"; string::iterator it; for (it = s.begin(); it != s.end(); it++) { ...原创 2019-05-20 18:17:57 · 2439 阅读 · 0 评论 -
C++字符串的几种读取方式
文章目录1.cin2.cin.get()用法一:cin.get(字符变量名)可以用来接收字符用法二:cin.get(字符数组名,接收字符数)用来接收一行字符串,可以接收空格用法三:cin.get(无参数)没有参数主要是用于舍弃输入流中的不需要的字符,或者舍弃回车,弥补cin.get(字符数组名,接收字符数目)的不足。3.cin.getline()4. getline()5. gets()6.get...转载 2019-05-12 10:11:18 · 2281 阅读 · 0 评论