c++其他
weixin_39518639
这个作者很懒,什么都没留下…
展开
-
UDTepoll
【代码】UDTepoll。原创 2022-12-14 22:30:01 · 105 阅读 · 0 评论 -
Windows 鼠标键盘钩子
设置钩子函数:SetWindowsHookEx(WH_MOUSE, HookMouseProce, NULL, GetCurrentThreadId());钩子的回调函数:LRESULT CALLBACK HookMouseProce(int nCode, WPARAM wParam, LPARAM lParam);钩子的取消函数:UnhookWindowsHookEx(g_hookmouse);DLL导出:extern “C” __declspec(dllexport) BOOL Insta原创 2021-10-17 11:56:24 · 324 阅读 · 0 评论 -
TCP 客户端发送文件到服务器
server.cpp#define _CRT_SECURE_NO_WARNINGS#define _WINSOCK_DEPRECATED_NO_WARNINGS#include <iostream>#include <stdio.h>#include <WinSock2.h>#include<string.h>#pragma comment(lib,"wsock32.lib")using namespace std;//缓存大小设置不能原创 2021-08-03 23:48:43 · 252 阅读 · 0 评论 -
UDP服务器判断客户端是否掉线
client.cpp#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include<stdlib.h>#include<string>#include<winsock.h>#pragma comment(lib,"ws2_32.lib")using namespace std;void getPub_ip(char *ip)//获取IP{ //system("curl -L ip.原创 2021-06-05 17:24:27 · 2267 阅读 · 1 评论 -
内存快速遍历(查找不断变小的数值)
#define _CRT_SECURE_NO_WARNINGS#include <windows.h>#include <stdio.h>#include <thread>#include<stdlib.h>#include<String.h>#include<time.h>#include<time.h>#include<math.h>#include<iostream>#inc原创 2021-05-23 21:38:46 · 497 阅读 · 0 评论 -
腾讯云配置mysql
配置mysql允许远程链接 #mysql -u root -pEnter password:……mysql> mysql>update user set host = ‘%’ where user = ‘root’;mysql>select host, user from user;c++ 链接#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<Windows.h>#inc..原创 2021-04-20 19:30:42 · 452 阅读 · 0 评论 -
c++ 内存查找某个进程的某个值
内存查找进程的数字,功能实现了,但是速度慢,有待改进。CE为什么那么快?#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include <fstream>#include<windows.h>#include<tlhelp32.h>#include <string.h>using namespace std;#if defined(_MSC_VER)#define strca.原创 2021-03-18 16:58:02 · 691 阅读 · 1 评论 -
C++ 字符串相互转换
//LPCWSTR 转stringstring WCharToMByte(LPCWSTR lpcwszStr){ string str; DWORD dwMinSize = 0; LPSTR lpszStr = NULL; dwMinSize = WideCharToMultiByte(CP_OEMCP, NULL, lpcwszStr, -1, NULL, 0, NULL, FALSE); if (0 == dwMinSize) { return FALSE; } lpszStr原创 2021-03-04 23:15:18 · 126 阅读 · 1 评论 -
c++ 数字识别
// 数字识别.cpp : 定义控制台应用程序的入口点。#include "stdafx.h"#include<stdio.h>#include<stdlib.h>#include<windows.h>#include<String.h>#include<time.h>#include <core.hpp> #include <highgui.hpp> #include <opencv2/high原创 2021-02-18 16:59:13 · 1381 阅读 · 2 评论 -
c++ Windows编程 字符串
#include <iostream>#include<cstdlib>#include<windows.h>#include<StrSafe.h>using namespace std;/*多字符(MultiChar)也就是ANSI编码的方式,而宽字符(WideChar)也就是Unicode编码的方式WCHAR Unicode字符PWSTR 指向Unicode字符串的指针PCWSTR 指向一个恒定的Unicode字符串的指针对应的ANS原创 2020-12-24 17:18:27 · 183 阅读 · 1 评论 -
c++ windows函数错误显示 getlasterror与formatemessage
#include<iostream>#include<Windows.h>#include <limits>#include<stdio.h>#include<locale.h>using namespace std;/*HANDLE CreateFile(LPCTSTR lpFileName, // 指向文件名的指针DWORD dwDesiredAccess, // 访问模式(写 / 读)如果为 GENERIC_R原创 2020-12-24 10:53:35 · 192 阅读 · 1 评论 -
c++window常见数据类型
Windows常见数据类型数值----------------------------(unsigned short)WORD:16位无符号整型 范围(0 65535)(unsigned long)DWORD:32字节无符号整型 范围(0 4294967295)(unsigned long)UINT:32字节无符号整型 范围(0 4294967295)(unsigned __int64)DWORD64:64字节无符号整型 范围(0 18446744073709551615)20位(int)INT原创 2020-12-23 14:18:48 · 214 阅读 · 0 评论 -
C++大数乘法
#include<iostream>#include<Cstdlib>#include<memory>#include<Cstring>using namespace std;#define MAX 1024/*计算2664乘以452526644525 10 30 30 20 5 4 12 12 8 2 10 30 30 20 58原创 2020-12-20 10:33:51 · 113 阅读 · 1 评论