随笔分类 -  C++

1 2 3 4 5 ··· 11 下一页
摘要:1、C语言里的基本数据类型,是固定的,所以导出库不分编译器版本,如果实现也是C,则debug和release也不分 2、C++的stl等实现,不同厂家、版本可能都不同,所以要分编译器版本、debug和release。即使是C风格导出,也要分debug和release Qt也是如此 3、如果是C风格导 阅读全文
posted @ 2026-08-21 15:25 朱小勇 阅读(6) 评论(0) 推荐(0)
摘要:编译: 1、下载代码 GitHub - libusb/libusb: A cross-platform library to access USB devices · GitHub 2、使用vs打开解决方案 3、直接编译 4、得到文件库和头文件 说明: 1、usb学习网站:USB中文网 2、使用li 阅读全文
posted @ 2026-05-29 14:10 朱小勇 阅读(27) 评论(0) 推荐(0)
摘要:1、网址 GitHub - pybind/pybind11: Seamless operability between C++11 and Python · GitHub 阅读全文
posted @ 2026-03-05 09:23 朱小勇 阅读(17) 评论(0) 推荐(0)
摘要:1、SimpleDSP GitHub - mozanunal/SimpleDSP: Header-only C library delivering essential DSP blocks—FIR/IIR filters, FFT, windowing, math helpers—optimise 阅读全文
posted @ 2026-03-05 00:47 朱小勇 阅读(41) 评论(0) 推荐(0)
摘要:1、h #ifndef WIN4C_H__ #define WIN4C_H__ #pragma once #define PI 3.141592653589793 #define EPS 1e-8 #include <vector> std::vector<double> rectangle(int 阅读全文
posted @ 2026-03-04 17:57 朱小勇 阅读(23) 评论(0) 推荐(0)
摘要:1、源码 FFTW Installation on Windows 2、教程 FFTW库使用详解-CSDN博客 阅读全文
posted @ 2026-03-04 00:18 朱小勇 阅读(21) 评论(0) 推荐(0)
摘要:源码: Eigen: A C++ template library for linear algebra 教程: 完整教程:Eigen:一个好用的线性代数运算的C++算法库 - clnchanpin - 博客园 阅读全文
posted @ 2026-03-04 00:07 朱小勇 阅读(16) 评论(0) 推荐(0)
摘要:说明 jcon-cpp 是一个用于 C++ 的 JSON-RPC 库,它允许开发者通过 JSON-RPC 协议进行进程间通信(IPC)。JSON-RPC 是一种轻量级的远程过程调用协议,基于 JSON 格式数据进行通信。基于MIT协议,最新代码基于Qt6实现。可通过Tcp和WebSocket实现RP 阅读全文
posted @ 2025-01-10 17:59 朱小勇 阅读(251) 评论(0) 推荐(0)
摘要:C++20引入了模块(Modules)的概念,这是一项重要的语言特性,旨在改进C++的编译速度和构建过程。模块提供了一种新的组织代码的方式,可以替代传统的头文件包含和预处理器。 使用模块可以带来以下几个好处: 更快的编译速度:传统的头文件包含方式在编译过程中需要进行大量的文件打开和文本处理操作,而模 阅读全文
posted @ 2024-11-12 09:39 朱小勇 阅读(196) 评论(0) 推荐(0)
摘要:1.代码 SetCursorPos(0, 0);//设置鼠标位置 INPUT input = {0}; input.type = INPUT_MOUSE; input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP; SendInput( 阅读全文
posted @ 2024-09-25 15:04 朱小勇 阅读(200) 评论(0) 推荐(0)
摘要:1.代码 #include <windows.h> #include <iostream> bool IsFileInUse(const std::wstring& filePath) { HANDLE hFile = CreateFileW( filePath.c_str(), GENERIC_R 阅读全文
posted @ 2024-09-09 22:49 朱小勇 阅读(218) 评论(0) 推荐(0)
摘要:1.现象 工程引入了工程外的C++类,编译失败 2.解决 引入外部源码时,只有引入头文件不会有异常,如果有CPP需要将源码加入到工程,只是include是不行的。 因为CPP需要编译,头文件不需要 阅读全文
posted @ 2024-03-13 11:39 朱小勇 阅读(45) 评论(0) 推荐(0)
摘要:https://zhuanlan.zhihu.com/p/268407438?utm_id=0 阅读全文
posted @ 2023-12-14 14:55 朱小勇 阅读(54) 评论(0) 推荐(0)
摘要:https://zhuanlan.zhihu.com/p/380856254 阅读全文
posted @ 2023-10-08 22:46 朱小勇 阅读(43) 评论(0) 推荐(0)
摘要:1.角度转复数,使用std::polar #include <iostream> #include <complex> #include <cmath> int main () { float theta = 45; float theta_pi = theta*(M_PI/180); std::c 阅读全文
posted @ 2023-10-06 18:29 朱小勇 阅读(327) 评论(0) 推荐(0)
摘要:1. #define MY_MACRO ... #ifdef MY_MACRO // 这部分代码会被预处理器处理 #else // 这部分代码会被预处理器忽略 #endif 2. int my_var = 1; #define MY_MACRO my_var ... #if defined(MY_M 阅读全文
posted @ 2023-09-06 15:11 朱小勇 阅读(52) 评论(0) 推荐(0)
摘要:1、代码 #include<iostream> #include<unordered_map> using namespace std; int main() { unordered_multimap<int, int> myUnorderedMultiMap = { {2, 10},{1, 20} 阅读全文
posted @ 2022-10-08 21:31 朱小勇 阅读(106) 评论(0) 推荐(0)
摘要:一、静态测试 1、CppCheck 2、Clang-tidy【linux】 二、动态测试 1、QTest 2、GTest 3、Boost Test 4、CodeViz【命令行】 5、CppTest【收费】 6、Insure++【linux】 7、Catch【hpp实现,提供几个宏】 阅读全文
posted @ 2022-08-11 19:42 朱小勇 阅读(563) 评论(0) 推荐(0)
摘要:1、函数式编程如std::bind、std::thread传参数等使用时,是对参数直接拷贝而不是引用 如: #include <functional> #include <iostream> void f(int& n1, int& n2, const int& n3) { std::cout << 阅读全文
posted @ 2022-05-31 15:32 朱小勇 阅读(199) 评论(0) 推荐(0)
摘要:1、功能 用一个从value递增的数列给[first, last)的容器赋值 2、实例 #include <iostream> #include <vector> #include <numeric> int main() { std::vector<int> nums(10); for (int 阅读全文
posted @ 2022-05-31 14:51 朱小勇 阅读(1405) 评论(0) 推荐(0)

1 2 3 4 5 ··· 11 下一页