C++
热情的rhew
小白小白
展开
-
windos usb 监听
1、windowsU口探测事件设备事件:WM_DEVICECHANGE首先要创建一个窗口,把设备事件和窗口关联创建回调函数,与窗口回调相联原创 2022-06-29 07:06:49 · 554 阅读 · 0 评论 -
Q格式的转换
基于C语言的Q格式使用详解 - 小麦大叔 - 博客园#include <stdio.h>#include <stdint.h>#include <math.h>int main(){ // 0111 1111 1111 1111 int16_t q_max = 32767; // 0x7FFF // 1000 0000 0000 0000 int16_t q_min = -32768; // 0x8000 floa原创 2021-09-11 17:39:19 · 588 阅读 · 0 评论 -
QT 下载地址
QT5.14.1http://download.qt.io/archive/qt/5.14/5.14.1/原创 2021-09-10 08:46:09 · 114 阅读 · 0 评论 -
wcstombs_s 中文问题
https://blog.csdn.net/qq_41017648/article/details/89787164原创 2021-09-09 17:16:00 · 464 阅读 · 0 评论 -
VS2019使用getopt及getopt_long
WINDOW写C++ 真的烦!!!getopt.h GitHub下载地址将这个getopt.h放在VS环境中就可以使用,如下C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include示例:#include <stdlib.h>#include <stdio.h>#include <getopt.h>intmai原创 2020-09-29 20:02:55 · 3380 阅读 · 1 评论 -
C++ pow(7,7)
使用int,i = 7 时 power =823 542int power = pow(i,i);所以使用 double power int n; long long int sum=0; cin >> n; for(int i=1;i<=n;i++){ //计算这一轮的值 double power = pow(i,i); //累加到sum中 sum = sum + power; }...原创 2020-05-29 19:35:46 · 704 阅读 · 0 评论 -
VS2017下编译运行目录下的单个CPP文件并运行
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"cl server.cppcl client.cppstart cmd /k serverstart cmd /k client原创 2020-04-24 12:16:18 · 4794 阅读 · 2 评论 -
DFS迷宫
DFS能干啥(二)DFS走迷宫1 2x2的迷宫,从(0,0)走到(1,1),有几种走法#include<iostream>using namespace std;int map[2][2];//地图 int book[2][2];//标记 int cnt=0;//统计次数 int dir[4][2]={{1,0},{0,1},{-1,0},{0,-1}};//方向 ...原创 2019-03-14 19:55:56 · 350 阅读 · 0 评论 -
DFS全排列
DFS能做什么(一)DFS排序1. 1~9的九个数字,排列成数字不重复的九位数#include&amp;lt;iostream&amp;gt;using namespace std;int a[10],book[10];void dfs(int step){ if(step==10){ for(int i=1;i&amp;lt;=9;i++){ cout &amp;lt;&amp原创 2019-03-13 23:48:18 · 413 阅读 · 0 评论 -
C++ STL Bitsets的使用
C++ STL Bitsets引用 #include&lt; bitset &gt;C++ Bitsets给程序员提供一种位集合的数据结构。Bitsets使用许多二元操作符,比如逻辑和,或等。1.文档说明方法简介Constructors创建新bitsetsOperators比较和赋值bitsetsany()如果有任何一个位被设置就返回true...原创 2019-02-19 13:41:41 · 467 阅读 · 0 评论 -
C/C++语言的基本数据类型
C/C++语言的基本数据类型有以下几个:int 整型char 字符型float 单精度浮点型double 双精度浮点型short int(或short) 短整型long int(或long) 长整型unsigned int 无符号整型unsigned short 无符号短整型unsigned long 无符号长整型unsigned char 无符号字符型类型(T...原创 2019-01-02 23:38:09 · 2397 阅读 · 0 评论