摘要: 目的 解决原生方式中的硬编码问题 简化后期执行的SQL 阅读全文
posted @ 2023-01-04 16:38 阿飞藏泪 阅读(12) 评论(0) 推荐(0) 编辑
摘要: string构造函数 1 string(); //创建一个空的字符串 例如string str; 2 string(const char* s)//使用字符串s进行初始化 3 string(const string& str);//使用一个string对象初始化另一个string对象 4 strin 阅读全文
posted @ 2023-01-04 11:25 阿飞藏泪 阅读(12) 评论(0) 推荐(0) 编辑
摘要: string 基本概念 本质:string 是C++风格的字符串,而string本质是一个类 string 和char *区别: char *是一个指针 string是一个类,类内部封装了char ,管理这个字符串,是个char型的容器 特点: string 类内部封装了很多成员方法 例如: 查找f 阅读全文
posted @ 2023-01-04 11:24 阿飞藏泪 阅读(16) 评论(0) 推荐(0) 编辑
摘要: vector容器嵌套容器 1 #include<iostream> 2 #include<vector> 3 using namespace std; 4 void test01() 5 { 6 vector<vector<int>>v; 7 vector<int>v1; 8 vector<int> 阅读全文
posted @ 2023-01-04 10:55 阿飞藏泪 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1 vector, 变长数组,倍增的思想 1 size() 返回元素个数 2 empty() 返回是否为空 3 clear() 清空 4 front()/back() 5 push_back()/pop_back() 6 begin()/end() 7 [] 8 支持比较运算,按字典序 2 pair 阅读全文
posted @ 2023-01-03 20:57 阿飞藏泪 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 一.使用方法 1 #include <bits/stdc++.h> 2 3 int main() 4 { 5 // write code here 6 7 return 0 8 } 二、头文件内容 1 // C++ includes used for precompiling -*- C++ -*- 阅读全文
posted @ 2023-01-03 20:50 阿飞藏泪 阅读(1052) 评论(0) 推荐(0) 编辑
摘要: vector 1.vector存放内置数据类型 容器:vector 算法:for_each 迭代器:vector<int>::iterator #include<iostream>#include<vector>#include<algorithm>//标准算法的头文件using namespace 阅读全文
posted @ 2023-01-03 20:22 阿飞藏泪 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 使用框架现阶段很麻烦,但是以后便于维护。 阅读全文
posted @ 2023-01-02 11:32 阿飞藏泪 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<vector> 3 #include<set> 4 using namespace std; 5 typedef pair<int,int> PII; 6 typedef pair<PII,int> PIII; 7 vector<PII 阅读全文
posted @ 2023-01-01 21:07 阿飞藏泪 阅读(49) 评论(0) 推荐(0) 编辑
摘要: STL初识 1.STL的诞生 C++的面向对象和泛型编程思想,目标就是复用性的提升。 面向对象的三大特征:封装、继承、多态。 2.STL基本概念 STL从广义上分为:容器 、算法、迭代器 容器和算法之间通过迭代器进行无缝衔接 STL几乎所有的代码都采用了模板类或者模板函数 3.STL六大组件 STL 阅读全文
posted @ 2023-01-01 12:25 阿飞藏泪 阅读(19) 评论(0) 推荐(0) 编辑
1 2 3
4