随笔分类 - C++;php
摘要:# WINDOWS API 项目实例 ##### 注册表开机项控制 ``` #include <iostream> #include <Windows.h> int main() { /* WINDOWS开机启动注册表: 1.(易被杀软检测修改注册表)添加键值-》"HKEY_LOCAL_MACHIN
阅读全文
摘要:title:《windows内核原理与实现》笔记 一. 计算机系统的硬件资源管理 1.计算机提供时钟中断:每隔一定时间,硬件系统触发一个中断,操作系统截获此中断,暂停当前任务,选择一个新任务。从而实现任务的切换。多个任务可以在一个CPU中轮换执行。 2.对于32位系统,内核代码可以访问进程整个4G空
阅读全文
摘要:创建线程 #include<iostream> #include<windows.h> using namespace std; DWORD WINAPI PROCESST1(LPVOID param); DWORD WINAPI PROCESST2(LPVOID param); DWORD WIN
阅读全文
摘要:#include <windows.h> #include <commctrl.h> #include "tchar.h" LRESULT CALLBACK xiaoxichuli(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HW
阅读全文
摘要:char 占1字节 所以 内存中存两个十六进制数,16位二进制数。对于ascii码61两个十六进制数 就是a这个字母;所以最大存值为00FF(0255); int 占4字节 所以内存中存4个十六进制数。32位二进制数;当int = 0xAA的时候,剩下的内存空间会用00 补齐。 比如 AA 00 0
阅读全文
摘要:进制相关: 在汇编中使用十六进制表示 计算机只懂二进制0/1 1Byte = 8Bit (8个二进制数) = 2个十六进制数 二进制and运算:有一个0就为0; 二进制or运算:有一个1就为1; 二进制xor(异或)运算:两个相同就为0; 寄存器: 字节:1byte :8bit 字:word :2b
阅读全文
摘要:电子书:Windows API 参考大全 其他:通过vs2019创建桌面应用程序。创造GUI桌面程序。 通过微软官方文档学习。 一个基本示例如下。需要深入学习通过C++ 操作windows系统。编程语言学差不多有思路,知道某东西能干嘛就行了。 windowsAPI参考手册:http://www.of
阅读全文
摘要:#include <iostream> #include <string> #include <fstream> using namespace std; /* 模式标志 描述 ios::app 追加模式。所有写入都追加到文件末尾。 ios::ate 文件打开后定位到文件末尾。 ios::in 打开
阅读全文
摘要:基本概念 #include <iostream> #include <string> using namespace std; //抽象类,无法实例化对象。 class Animal { public: //3.通过加virtual关键字使其变虚函数。 virtual void talk() { c
阅读全文
摘要:基本语法 #include <iostream> #include <string> using namespace std; //语法:子类类名:public 父类类名 class Animal { public: Animal() ; void walk(string args) { cout
阅读全文
摘要:全局函数做友元 #if 0 #include <iostream> #include <string> using namespace std; //用friend关键字访问类中private的函数方法。 class Building { //2.在此用friend关键字声明! friend voi
阅读全文
摘要:类对象作为类成员 #include <iostream> #include <string> using namespace std; //c++类中的成员可以是另一个类的对象,称为对象成员。 class A { public: A() { cout << "A side \n"; }; ~A()
阅读全文
摘要:构造函数和析构函数 #include <iostream> #include <string> using namespace std; //创建一个类,C++编译器会给类添加至少三个函数 //默认构造函数;析构函数;拷贝构造函数,当自己创建这三个函数时就会抵消掉默认创建的函数了。 /* 构造函数:
阅读全文
摘要:类定义 #include <iostream> #include <string> using namespace std; #define PI 3.141592657 class Circle { //访问权限 //公共权限 public: //属性 int half_r; //行为 doubl
阅读全文
摘要:#include <iostream> using namespace std; //.引用的本质在C++内部实现的是一个指针常量,引用必须初始化;引用初始化后不能被改变(不能在引用别的东西);引用和原名使用同一内存空间,修改都是一起修改。 int main() { //引用:给变量起别名 //语法
阅读全文
摘要:内存分区 来源:https://blog.csdn.net/qq_33515733/article/details/107168302 图来源:https://blog.csdn.net/chenyijun/article/details/81938287 1、代码区 程序C/C++代码存放区,特点
阅读全文
摘要:/*C/C++ 数组允许定义可存储相同类型数据项的变量,但是结构是 C++ 中另一种用户自定义的可用的数据类型,它允许您存储不同类型的数据项。*/ #include <iostream> #include <string> using namespace std; //1.定义结构体 struct
阅读全文
摘要:转自:https://blog.csdn.net/weixin_39640298/article/details/84900326 原作者:YoungYangD 概述 C/C++语言之所以强大,以及其自由性,很大部分体现在其灵活的指针运用上。因此,说指针是C/C++语言的灵魂一点都不为过。 有好的一
阅读全文
摘要:#include <iostream> #include <string> #include "mult.h"//引用函数 using namespace std; /* 1.定义函数 return_type function_name( parameter list ) { body of the
阅读全文
摘要:#include <iostream> using namespace std; int main() { //1.定义数组 /*int args[5] = { 1,2,3}; //数组不够5个元素,将被0填充 for ( int i =0 ; i< 5 ; i++) { cout << args[
阅读全文

浙公网安备 33010602011771号