- 博客(6)
- 收藏
- 关注
原创 c++面试常见问题之实现一个string类
#include #include #include using namespace std;class MyString{public:MyString();MyString(const char* pcStr);MyString(const MyString& oOther);~MyString();MyString& operator=(const My...
2019-08-06 20:16:47
187
原创 stl之vector学习笔记
#include #include #include #include #include <stdlib.h>#include using namespace std;int main(){vector v;v.reserve(10);//设置最小容纳数if(v.empty())//判断是否为空{cout<<“the vector is empt...
2019-08-06 20:10:30
99
原创 c语言经典面试题目总结
1.写一个“标准”宏,这个宏输入两个参数并返回较小的一个答:#define MIN(x, y) ((x)<(y)?(x):(y))注意 宏定义结尾没有分号。2.#与##的作用?答:#是把宏参数转化为字符串的运算符,##是把两个宏参数连接的运算符。例如:#define STR(arg) #arg 则宏STR(hello)展开时为”hello”#define NA...
2019-07-24 19:37:43
192
原创 快速排序与二分查找的组合 学习笔记
#include<stdio.h>const short LEN=100;//二分查找算法int erfen(int a[],int low,int high,int key){int mid=low+(high-low)/2;if(low>high)return -1;else{if(a[mid]==key)return mid;else if(a[mi...
2019-07-24 16:36:35
101
原创 排序算法 自用 学习笔记
#include<stdio.h>#include<time.h>#include<stdlib.h>const short LEN=1000;void maopao(int a[],int len){int i,j,temp;for(i=0;i<len;i++){for(j=0;j<len-i-1;j++){if(a[j]>a...
2019-07-24 12:07:01
76
原创 数据结构链表自学笔记
这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Ma...
2019-07-23 15:47:22
114
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人