自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 收藏
  • 关注

原创 异步操作

readFile最后一个参数决定如何异步操作typedef struct _OVERLAPPED { ULONG_PTR Internal;//请求的错误码 ULONG_PTR InternalHigh;//保存传输成功的字节数 union { struct {//从哪里开始,两个dword DWORD Offset;

2017-05-21 22:23:52 203

原创 Windows 文件操作

LARGE_INTEGER//结构体 BOOL WINAPI GetFileSizeEx(//文件大小 In HANDLE hFile, Out PLARGE_INTEGER lpFileSize );//64位,32位弃用typedef union _LARGE_INTEGER { struct { DWORD LowPart; LONG H

2017-05-14 10:07:09 303

原创 windows 微软数据类型

_PTR地址值可变,32位与64位不同__int8 __int16 __int32 __int64 wchar_t ADCONNECTION_HANDLE tydef void* ADCONNECTION_HANDLE BOOL typedef int BOOL ,*PBOOL,*LPBOOL; BOOLEN tydef BYTE BOOLEN,*PBOOLEAN; BSTR

2017-05-08 09:07:14 453

原创 Windows API分类

基础服务 文件系统(file system) 外部设备(device) 进程(process) 注册表(windows registry) 错误处理机制(error handing) 这些功能接口位于32位windows下到kernel32.dll和advapi32.dll中。 图形设备接口(GDI) gdi32.dll 效率不高 图形化用户界面(GUI ) comctl32.dll

2017-05-05 10:01:23 203

原创 algorithm 示例

绑定函数#include<function> std::bind2nd(const&funclift,_Ty& right); std::bind1nd(const&funclift,_Ty& left); std::bind2nd(std::less<int>(),num));std::count_if(iterator,iterator,func); std::count_if(iterato

2017-04-05 10:32:38 152

原创 stl结构

gp与oop不同,各个模块独立分开

2017-04-05 09:59:18 255

原创 3 个 new

new operator int *p =new int; //1 分配内存 //2 调用构造函数 operator new //分配内存,不调用构造函数 string *str = operator new(sizeof(string));//相当于malloc placement new //不分配新内存,在已有的内存上构建对象 new ((void*) __P) _T1(__value)Dem

2017-03-21 08:24:47 170

原创 c++ STL 泛型 模板

动态多态 运行期间 面向对象 纯虚函数 强制实现更难调试,运行更快 静态多态 编译期间 泛型 必须实现那些接口 非强制实行份文件写注意 template<typename T> class Demo public: template<typename X> void Assign(const X val);

2017-03-11 07:08:17 190

原创 MFC List Control控件

List Control 控件一共有四种呈现的方式 大图标、小图标、列表和报表形式 列表没有表头,报表形式有表头初始化m_list.InsertColumn(0,L"第一列", LVCFMT_LEFT,100); m_list.InsertColumn(1, L"第二列", LVCFMT_LEFT, 100); //创建图片 32位 m_imagelist.Create(3

2017-02-19 08:37:05 583

原创 指针&数组&函数指针

一维数组 数组名相当于当前类型的指针 type* const &数组名int array[10]; int other[2][5];//内存分布一样 array+1;//首元素地址+1*type(4) other+1;//首 &数组名+5*1*type(4);+1相当于数组指针+1一个数组有 :数组类型 元素类型 数组大小数组指针int(*parray)[10]=&array;//数组指针与ar

2017-02-16 12:54:46 165

原创 Inheritance继承

public继承 维持不变 权限不变 protected继承 修改访问权限,全部变成protected 将基类中的public变成protected private继承 全部变成private,将基类中public,protected改为private派生类也可作为基类class Base { public: //外部可以访问 int public_i_;

2017-01-20 09:05:00 156

原创 memcpy的坑

void * memcpy ( void * destination, const void * source, size_t num ); 复制 source 到 destination ,source 的值是指针 ,实现的是浅拷贝

2017-01-20 08:08:44 1437

原创 vector类笔记

vector是序列式容器,可变长数组std::vector</*当前容器类型可以是任何类型,不能是引用和const*/> //std::vector<int> demo; //std::vector<std::string> demo; //std::vector<Demo> demo;构造std::vector<int> first;

2017-01-15 11:55:19 223

原创 智能指针

class Demo { public: void Open() {} void Close() {} private: int num_; }; class MyPoint { public: MyPoint() { demo_ = new Demo; } ~MyPoint() { delete dem

2017-01-14 13:18:58 192

原创 const与类

const 访问 const 非const 访问 非 const代码量大时常用非const调用const,转换为非constconst char & String::operator[](const int index) const { return data_[index]; } char & String::operator[](const int index)

2017-01-14 10:52:40 240

原创 static与类

c++static 限定作用域,只初始化一次 新特性:与函数, 不属于对象,属于类,没有this指针,没有对象属性,不能访问非静态(static)成员static 访问static! 非static 访问 非static! static 变量 1. 对象共享,不属于对象,属于类 2. 通过类名直接访问 函数 3. 没有this指针,无法访问非静态(变量,函数

2017-01-14 10:44:24 156

原创 string类笔记

myString private: char *data_; unsigned int len_;//空间长度 unsigned int index_;//数据长度 char* SetString(const char *str); char* Alloc(const char *str);//分配空间函数

2017-01-14 10:07:51 131

原创 c++ operatot重载

//返回Interger的引用 Integer& Integer::operator=(int num) { _num = num; return *this; } // Integer& Integer::operator=(Integer& other) { _num = other._num; return *this; } int Integer::GetNum()

2017-01-04 01:17:23 739

原创 c++ 类 class Object C++

namespace Name {//命名空间,用以区别所使用的类属于哪个机构,为了命名空间污染,不建议使用    using namespace std;这样的语句 class MyString;//包含自己的类时,放在这里,前置声明 //MyString *_str;使用指针或引用. class ClassDemo//一个类新建一对文件,.h和.cpp,包含头文件,建议放在点cpp中,以

2016-12-30 11:47:32 811

原创 c to c++进阶

bool c语言true为1,0为false c++0为false,非0为true bool原生布尔 _Bool,c98加上的,==bool 命名空间 namespace 头文件 三种:

2016-12-21 11:13:55 305

原创 c语言字符串分割函数mysplit,可处理多个空格

以参数ch字符分割,分割char数组到char二维数组中,返回词的个数 可处理多个重复ch的情况,无论开头,中间,还是结尾int mysplit(char *pstr, char(*pcutcmd)[10], char ch) { int ret = 0; if (NULL != pstr && NULL != pcutcmd) { char *t

2016-10-28 13:02:56 1851

原创 lesson21 函数在汇编中的过程

//lea取地址 //call 函数名(函数地址)int bigernum = Greater(10, 100); 009616FE push 64h //传入第一个参数 00961700 push 0Ah //传入第二个参数 00961702 call _Greater (0961221h) 0096

2016-09-27 06:44:10 192

原创 lesson07-17 各数据类型,printf,scanf函数格式

lesson07 软件和硬件 软件 硬件 源代码 汇编(软件) 内存 cpu(硬件)windows –in 和 out–硬件 in 寄存器明,端口号 out 端口号,寄存器i/o控制器 中断IRQ 发送中断请求io控制器 io控制器。。。 中断控制器 同时处理多个中断 轮询lesson08First Program cl 文件名.c 编译 .obj目标

2016-09-20 18:55:36 149

原创 lesson01 计算机科学

程序是什么? ………组成?机器语言?内存地址?复制程序的解释和运行的计算机部件?cpu寄存器 存储控制 指挥家运算器 计算 时钟 GHZ只可控制寄存器 高级——低级——机器语言——CPU 代码——EXE——加载——CPU基址+变址=内存地址 通用寄存器 指令寄存器 栈寄存器程序计数器 记录下一条指令的值 自动累加 条件分支

2016-09-13 09:30:11 163

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除