摘要: 2023-02-23 WinRAR 6.21 简体中文商业正式版:https://www.win-rar.com/fileadmin/winrar-versions/sc/sc20230223/wrr/winrar-x64-621sc.exehttps://www.win-rar.com/filea 阅读全文
posted @ 2023-03-10 14:00 梦之心 阅读(2036) 评论(1) 推荐(1) 编辑
摘要: /* HelloMsg.c -- Displays "Hello, Windows 98!" in a message box (c) Charles Petzold, 1998 */ #include <windows.h> int WINAPI WinMain (HINSTANCE hInsta 阅读全文
posted @ 2023-02-19 22:27 梦之心 阅读(17) 评论(0) 推荐(0) 编辑
摘要: VS2022专业版和企业版的密钥 Visual Studio 2022 Enterprise(企业版):VHF9H-NXBBB-638P6-6JHCY-88JWH Visual Studio 2022 Professional(专业版):TD244-P4NB7-YQ6XK-Y8MMM-YWV2J V 阅读全文
posted @ 2022-05-05 19:16 梦之心 阅读(1395) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 判断是否重复运行 /// </summary> /// <returns>FALSE 没运行,TRUE 已运行</returns> BOOL IsAlreadyRun() { HANDLE hMutex = NULL; hMutex = ::CreateMutex 阅读全文
posted @ 2021-12-27 17:30 梦之心 阅读(44) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 模块遍历 /// </summary> /// <param name="dwProcessId">进程PID</param> /// <returns></returns> BOOL EnumProcessModule(DWORD dwProcessId) { 阅读全文
posted @ 2021-12-27 17:21 梦之心 阅读(31) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 线程遍历 /// </summary> /// <returns></returns> BOOL EnumThread() { THREADENTRY32 te32 = { 0 }; te32.dwSize = sizeof(THREADENTRY32); HAN 阅读全文
posted @ 2021-12-27 17:17 梦之心 阅读(52) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 进程遍历 /// </summary> /// <returns></returns> BOOL EnumProcess() { PROCESSENTRY32 pe32 = { 0 }; pe32.dwSize = sizeof(PROCESSENTRY32); 阅读全文
posted @ 2021-12-27 17:15 梦之心 阅读(36) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 提示错误代码 /// </summary> /// <param name="lpszText">提示内容</param> VOID ShowError(TCHAR* lpszText) { TCHAR szErr[MAX_PATH] = { 0 }; ::wsp 阅读全文
posted @ 2021-12-27 17:05 梦之心 阅读(35) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 获取模块地址 /// </summary> /// <param name="pid">进程PID</param> /// <param name="ModuleName">模块名称</param> /// <param name="StartAddress">开 阅读全文
posted @ 2021-12-27 16:22 梦之心 阅读(293) 评论(0) 推荐(0) 编辑
摘要: Hello.h class CMyApp : public CWinApp { public: virtual BOOL InitInstance();//虚函数 }; class CMainWindow : public CFrameWnd { public: CMainWindow(); pro 阅读全文
posted @ 2021-11-17 20:48 梦之心 阅读(30) 评论(0) 推荐(0) 编辑
摘要: DWORD 进程_名取ID(CString 进程名) { HANDLE 进程快照 = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if (INVALID_HANDLE_VALUE == 进程快照) { return NULL; } PROCESS 阅读全文
posted @ 2021-09-24 12:02 梦之心 阅读(52) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //函数重载的注意事项 //1.引用作为函数重载 void fun(int& a) //int &a=10;不合法 { cout << "fun(int& a)调用" << endl; } void fun(const 阅读全文
posted @ 2021-09-06 21:08 梦之心 阅读(36) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //函数重载 //可以让函数名相同,提高复用性 //函数重载的满足条件 //1.同一个作用域下 //2.函数名称相同 //3.函数参数类型不同,或者个数不同,或者顺序不同 void func() { cout << " 阅读全文
posted @ 2021-09-06 20:56 梦之心 阅读(33) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //占位参数 //返回值类型 函数名(数据类型){} //目前阶段的占位参数我们还用不到,后面课程中会用到 //占位参数还可以有默认参数 void func(int a, int = 10) { cout << "he 阅读全文
posted @ 2021-09-06 20:44 梦之心 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //函数的默认参数 //如果我们传入了自己的数据,就用自己的数据,如果没有,那么就用默认 //语法 :返回值类型 函数名(形参=默认值){} int func(int a, int b=20, int c=30) { 阅读全文
posted @ 2021-09-06 20:34 梦之心 阅读(45) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //打印数据函数 void showvalue(const int& val) { cout << "val=" << val << endl; } int main() { //常量引用 //使用场景,用来修饰形参, 阅读全文
posted @ 2021-09-06 19:17 梦之心 阅读(41) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //发现是引用,转换为int * const ref=&a; void func(int& ref) { ref = 100;//ref是引用,转换为*ref=100; } int main() { int a = 1 阅读全文
posted @ 2021-09-06 19:05 梦之心 阅读(26) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <fstream>//包含头文件 #include <string> using namespace std; //文本文件,读文件 void test01() { //1.包含头文件 //2.创建流对象 ifstream ifs; //3. 阅读全文
posted @ 2021-09-05 23:12 梦之心 阅读(35) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <fstream>//包含头文件 using namespace std; void test01() { //1.包含头文件 //2.创建流对象 ofstream ofs; //3.打开文件 ofs.open("text.txt", ios 阅读全文
posted @ 2021-09-05 23:12 梦之心 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <fstream>//包含头文件 using namespace std; //二进制文件 写文件 class Person { public: char m_name[64];//姓名 int m_age;//年龄 }; void test 阅读全文
posted @ 2021-09-05 23:11 梦之心 阅读(107) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <fstream>//包含头文件 #include <string> using namespace std; //二进制文件 读文件 class Person { public: char m_name[64];//姓名 int m_age 阅读全文
posted @ 2021-09-05 23:10 梦之心 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //引用做函数的返回值 //1.不要返回局部变量的引用 int& test01() { int a = 10; //局部变量存在四区中的栈区 return a; } //2.函数的调用可以作为左值 int& test0 阅读全文
posted @ 2021-09-05 21:55 梦之心 阅读(53) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //交换函数 //1.值传递 void swap01(int a, int b) { int temp = a; a = b; b = temp; cout << "swap01 a=" << a << endl; c 阅读全文
posted @ 2021-09-05 21:40 梦之心 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int main() { int a = 10; //1.引用必须初始化 //int& b;//错误,必须初始化 int& b = a; //2.引用初始化后,不可以更改 int c = 20; b = c;//赋值操 阅读全文
posted @ 2021-09-05 21:24 梦之心 阅读(46) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int main() { //引用基本语法 //数据类型 &别名=原名 int a = 10; //创建引用 int& b = a; cout << "a=" << a << endl; cout << "b=" << 阅读全文
posted @ 2021-09-05 21:13 梦之心 阅读(32) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //1.new的基本语法 int* func() { //在堆区创建整数数据 //new返回是 该数据类型的指针 int* p = new int(10); return p; } void test01() { in 阅读全文
posted @ 2021-09-04 22:47 梦之心 阅读(31) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int* func() { //利用new关键字 可以将数据开辟到堆区 //指针本质也是局部变量,放在栈上,指针保存的数据是放在了堆区 int* p = new int(10); return p; } int mai 阅读全文
posted @ 2021-09-04 22:33 梦之心 阅读(19) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //栈区数据注意事项--不要返回局部变量的地址 //栈区的数据有编译器管理开辟和释放 int* func(int b)//形参数据也会放在栈区 { b = 100; int a = 10;//局部变量存放在栈区,栈区的 阅读全文
posted @ 2021-09-04 22:25 梦之心 阅读(29) 评论(0) 推荐(0) 编辑
摘要: //内存分区模型 //C++程序在执行时, 将内存大方向划分为4个区域 //代码区:存放函数体的二进制代码, 由操作系统进行管理的 //全局区:存放全局变是和静态变是以及常量 //栈区:由编译器自动分配释放, 存放函数的参数值局部变量等 //堆区:由程序员分和释放若员不释放稈序结束时由操作系统回收 阅读全文
posted @ 2021-09-04 22:13 梦之心 阅读(38) 评论(0) 推荐(0) 编辑
摘要: //通讯录是一个可以记录亲人、好友信息的工具 //本教程主要利用C++来实现一个通讯录管理系统 //系统中需要实现的功能如下 //添加联系人向通讯录中添加新人, 信息包括(姓名、性别年龄、联系电话、家庭住址)最多记录1000人 //显示联系人 : 同示通讯录中所有联系人信息 //删除联系人 : 按照 阅读全文
posted @ 2021-09-04 21:09 梦之心 阅读(64) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; struct Hero { //姓名 string name; //年龄 int age; //性别 string sex; }; //冒泡排序实习年龄升序排列 void bubblesort(Hero heroarr 阅读全文
posted @ 2021-09-04 18:28 梦之心 阅读(30) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //学生结构体 struct Student { //姓名 string sName; //分数 int score; }; //老师的结构体 struct Teacher { //姓名 string tname; / 阅读全文
posted @ 2021-09-04 17:56 梦之心 阅读(78) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //const 的使用场景 //定义学生结构体 struct student { //姓名 string name; //年龄 int age; //分数 int score; }; //将函数中的形参改为指针,可以减 阅读全文
posted @ 2021-09-04 17:16 梦之心 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //定义学生结构体 struct student { //姓名 string name; //年龄 int age; //分数 int score; }; //打印学生函数 //1.值传递 void printstud 阅读全文
posted @ 2021-09-04 16:57 梦之心 阅读(47) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //定义学生结构体 struct student { string name; int age; int score; }; //定义老师结构体 struct teacher { int id; string name 阅读全文
posted @ 2021-09-04 16:50 梦之心 阅读(68) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //结构体指针 //定义学生结构体 struct Student { //姓名 string name; //年龄 int age; //分数 int score; }; int main() { //1.创建学生结构 阅读全文
posted @ 2021-09-04 16:36 梦之心 阅读(22) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //1.定义结构体 struct Student { //姓名 string name; //年龄 int age; //分数 int score; }; int main() { //2.创建结构体数组 Studen 阅读全文
posted @ 2021-09-04 16:32 梦之心 阅读(74) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //1.创建学生数据类型:学生包括(姓名,年龄,分数) //自定义数据类型,一些类型集合组成的一个类型 //语法 struct 类型名称{成员列表} struct Student { //成员列表 //姓名 strin 阅读全文
posted @ 2021-09-04 16:22 梦之心 阅读(170) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; //冒泡排序函数 void bubblesort(int* arr, int len) { for (size_t i = 0; i < len - 1; i++) { //内层循环对比 次数=元素个数-当前轮数-1 阅读全文
posted @ 2021-09-04 16:09 梦之心 阅读(56) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; void swap01(int a, int b) { int temp = a; a = b; b = temp; cout << "swap01中a=" << a << endl; cout << "swap01中 阅读全文
posted @ 2021-09-04 15:31 梦之心 阅读(24) 评论(0) 推荐(0) 编辑