
C++
萍凡行者
这个作者很懒,什么都没留下…
展开
-
遍历vector二维数组
遍历vector二维数组的方法下标遍历vector<vector<int>> vec(5, vector<int>(6, 0));int i,j;for (i = 0; i < vec.size(); i++){ for(j = 0; j < vec[i].size(); j++) cout << v...原创 2020-02-09 12:53:22 · 4257 阅读 · 2 评论 -
C++学习之旅-string的使用
文章目录string类简介创建string类对象string类常用函数成员函数其他函数string类简介string类是C++98标准对C++库的扩展,用来存储字符串。使用string类需要包含<string>头文件。以下是摘自<xstring>头文件中的代码,<string>头文件中包含了<xstring>。// string是basic_...原创 2020-02-04 15:26:50 · 272 阅读 · 0 评论