随笔分类 -  C,C++,C#

摘要:void quickSort(int(&arr)[BUFSIZ],int start,int end){ int key=arr[start]; int p1=start; int p2=end; if(end=key && arr[p2]2){ ... 阅读全文
posted @ 2016-01-04 10:00 SKY_VIEW 阅读(659) 评论(0) 推荐(0)
摘要:#include "stdafx.h"#include #include #include #include #include #include #include using namespace std;#define BUFSIZ 100int (&strToIntArr(string s,int... 阅读全文
posted @ 2016-01-02 21:17 SKY_VIEW 阅读(169) 评论(0) 推荐(0)
摘要:file operationAPI functionsHANDLE CreateFile(lpFileName,dwDesiredAccess,dwShareMode,lpSecurityAttributes,dwCreateDisposition,dwFlagsAndAttributes,hTem... 阅读全文
posted @ 2014-08-10 11:35 SKY_VIEW 阅读(466) 评论(0) 推荐(0)
摘要:#include "stdafx.h"#include #include #include #include #include #include #include using namespace std;class manager;class employeeInfo;manager *gMgr;s... 阅读全文
posted @ 2014-08-09 11:38 SKY_VIEW 阅读(198) 评论(0) 推荐(0)
摘要:#include #include #include #include using namespace std;int main(int argc, char* argv[]){string s("中航光电系空方克星股市震荡的安全港湾或引业绩突增");vector vs;for(unsigned i... 阅读全文
posted @ 2014-08-06 14:43 SKY_VIEW 阅读(208) 评论(0) 推荐(0)
摘要:struct tm;这是一个结构体,包括了时间的各个属性年月日,时分秒 time(time_t * t);获取从1900年到现在经过的毫秒数,或者也可以这么用time_t t=time(NULL); localtime(&tt);其中tt为time_t类型的变量,localtime返回一个指向tm类 阅读全文
posted @ 2014-08-06 11:36 SKY_VIEW 阅读(311) 评论(0) 推荐(0)
摘要:都和typedef有关一个是接口机制时用到的就是所有用到接口的源文件只需包含简单的接口声明接口的具体实现在其他源文件中实现接口可以是//interface.htypedef struct I *pp fun();//implementtypedef struct{}_I,*_p;使用时只需inclu... 阅读全文
posted @ 2013-08-28 16:52 SKY_VIEW 阅读(276) 评论(0) 推荐(0)
摘要:一、c++允许定义指向类成员的指针,包括类函数成员指针和类数据成员指针格式如下:class A{public: void func(){printf("This is a function!\n");} int data;};void (A::*p)()=&A::func;//带有取址符号,普通... 阅读全文
posted @ 2013-08-25 15:09 SKY_VIEW 阅读(911) 评论(0) 推荐(0)
摘要:1.指针的引用 他也是引用,引用是特定内存块的别名 2.变量定义 更准确的说是内存使用约定,并为该约定命名 命名3.指向常变量的指针和常指针 有点拗口,都是指针,但对于所在内存块的使用约定不同。常变量指针只能用于指向常变量,和普通指针不同。常指针所在内存块有固定的数据不可更改。 4.引用类型做参数时 阅读全文
posted @ 2013-08-08 21:06 SKY_VIEW 阅读(808) 评论(0) 推荐(0)
摘要:1.仿函数的定义是很简单的,就是一个重载了括号()运算符的类,也被称为函数对象。主要是用于个性化扩展算法对象。stl中实现了好多算法,每个算法都可以完成日常的大部分工作,设计者还允许你在这些强大的算法上再插上别的功能。怎么插?插的比较泛型和objectoriented?这就需要直接把你想添加的功能做... 阅读全文
posted @ 2013-08-08 21:02 SKY_VIEW 阅读(681) 评论(0) 推荐(0)
摘要:先说说面向对象思想的一个总体认识对象通常会有行为,这些行为是靠信息支撑,这些信息包括外部信息和内部信息,对象行为会维护其中的一部分信息因此对象可以看成是这样一种实体,它获取信息,然后决定自己的行为方式,并主动对全部或部分信息进行维护。此外对象的定义可以是递归的,即行为可以涉及到若干个更小功能的对象,... 阅读全文
posted @ 2013-08-06 20:43 SKY_VIEW 阅读(323) 评论(0) 推荐(0)