摘要: shell: shell是linux内核和应用程序间的解释程序,向内核翻译及传达用户和程序的指令 正则表达式 \w \s \d \b 用法: . 匹配除换行符以外的任意字符 \w 匹配字母或数字或下划线 \s 匹配任意的空白符 \d 匹配数字 等价于[0-9] \D 匹配非数字字符 \b 匹配单词的 阅读全文
posted @ 2019-06-01 15:05 countryboy666 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 文件IO回调函数是由别人的函数执行时调用的函数.不带缓冲的文件IO 每个read和write都调用内核中的一个系统调用只要涉及在多进程间通信共享资源.原子操作就变成非常重要.函数: int open(const char pathname, int oflag,..mode); int create 阅读全文
posted @ 2019-06-01 08:03 countryboy666 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #include <assert.h> template<class T> class Queue { public: Queue(int =10); ~Queue(delete []element;) void EnQueue(T item); T DeQueue(); T GetFront(); 阅读全文
posted @ 2019-05-30 15:02 countryboy666 阅读(87) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; bool ALLisNum(string str); bool myatoi(string str,int &num); class RecurveArray { public: int Maxsize; int *Elements;//数组类声明 int CurrentSize; Recurv... 阅读全文
posted @ 2019-05-30 14:58 countryboy666 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 函数原型 > 返回值,函数名,形参列表,函数体函数声明 > 返回值,函数名,形参列表先声明在使用 int fun(){} int ret = fun() //没有retrun 返回随机值 函数先声明后定义: 形参调用函数时产生,形参: 1, 传址调用 传地址调用 2,数组作为形参 >指针 void 阅读全文
posted @ 2019-05-29 15:42 countryboy666 阅读(92) 评论(0) 推荐(0) 编辑
摘要: //思路分析: 定一个链表类,成员有 (节点,迭代器) 阅读全文
posted @ 2019-05-29 13:33 countryboy666 阅读(153) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include typedef struct node { int iData; struct node* next; }Node; typedef struct list { int ilen; Node* pFrist; }List; //创... 阅读全文
posted @ 2019-05-27 19:07 countryboy666 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 容器适配器: 适配器没有提供迭代器 queue: size(),empty(),swap(),push(),emplace() pop不会返回弹出的元素,通过front()和back()分别获得第一个和最后一个元素的引用 #include #include using namespace std; template class PackBuffer { public:... 阅读全文
posted @ 2019-05-26 23:19 countryboy666 阅读(145) 评论(0) 推荐(0) 编辑
摘要: <!-- p, li { white-space: pre-wrap; } --> <!--StartFragment-->/* 第12章 理解容器与迭代器 STL中的容器是范型结构.贴别适合保存数据集合.容器为模板. 5大类17个容器 顺序容器: vector list deque array f 阅读全文
posted @ 2019-05-26 20:54 countryboy666 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 继承覆盖:如果子类有和父类同名的方法,父类方法将被覆盖如果需要访问父类的方法,则要调用一个为绑定类方法,明确给出子类的实例class Manufacture: def __init__(self,phone,email): self.phone = phone self.email = emailc 阅读全文
posted @ 2019-05-26 12:13 countryboy666 阅读(293) 评论(0) 推荐(0) 编辑