![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
貌寝
这个作者很懒,什么都没留下…
展开
-
字符串tip
insert函数// inserting into a string#include <iostream>#include <string>int main (){ std::string str="to be question"; std::string str2="the "; std::string str3="or not to be"; std::string::iterator it; /// used in the same order原创 2022-03-19 11:08:30 · 147 阅读 · 0 评论 -
排序tip
memsetmemset (数组名, 初始值, 数组长度);sort#include<algorithm>sort(a, a+N, cmp);bool cmp(int a,int b){ return a>b; //升序}vector建立:vector<pair<int,int>> vec;插入:vec.push_back(make_pair(a,b));排序:sort(vec.begin(),vec.end(),cmp).原创 2022-02-28 10:37:52 · 134 阅读 · 0 评论