随笔分类 - STL
学习STL中的日常笔记
摘要:#include<iostream> #include<map> #include<algorithm> using namespace std; void func(pair<int, char> t) { cout << "key: " << t.first << " value: " << t
阅读全文
摘要:#include<iostream> #include<algorithm> #include<list> using namespace std; struct Node { char a; int b; }; void func(Node &t) { cout << t.a << " " <<
阅读全文
摘要:#include<iostream> #include<vector> using namespace std; struct STU { int a; }; int main() { vector<int> vec1; //vector 中的结构可以是C C++所有的基础类型 vector<cha
阅读全文
摘要:#include<iostream> #include<string> using namespace std; int main() { //string构造函数 string str1; cout << str1.c_str() << endl; //c_str 返回一个const char *
阅读全文

浙公网安备 33010602011771号