随笔分类 -  C++

摘要:1 #ifndef LIVE_DATA_H 2 #define LIVE_DATA_H 3 4 #include <mutex> 5 #include <vector> 6 #include <functional> 7 8 template <typename T> 9 class LiveDat 阅读全文
posted @ 2025-02-19 18:07 禅元天道 阅读(3) 评论(0) 推荐(0) 编辑
摘要:windows环境下的基础代码: 1 // server.cpp 2 #include <stdio.h> 3 #include <winsock.h> 4 #pragma comment(lib, "ws2_32.lib") 5 6 int main() 7 { 8 // 初始化DLL 9 WSA 阅读全文
posted @ 2025-02-05 16:47 禅元天道 阅读(4) 评论(0) 推荐(0) 编辑
摘要:1 using XTimePoint = std::chrono::time_point<std::chrono::system_clock>; 2 using XTimeSpan = std::chrono::seconds; 3 4 class XDataTime { 5 public: 6 X 阅读全文
posted @ 2025-01-12 13:51 禅元天道 阅读(7) 评论(0) 推荐(0) 编辑
摘要:在配置文件中设置 USE_MATHJAX = YES . 行内公式, 嵌入在普通文字中. 使用 \f\f(\f)./@briefThedistancebetween\f(x_1,y_1)\fand\f(x_2,y_2)\f$ is * 阅读全文
posted @ 2024-09-23 09:24 禅元天道 阅读(45) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <numeric> #include <thread> #include <vector> template<typename Iterator, typename T> struct threadBlock { void operator( 阅读全文
posted @ 2024-08-08 13:07 禅元天道 阅读(10) 评论(0) 推荐(0) 编辑
摘要:在C-Free中编译简单的C++代码,发现报以上错误:ISO C++ forbids initialization of member `x'(ISO C++禁止初始化成员变量‘x’),经查阅资料: c++类基于C语言的结构体(struct),并添加了许多特性。C语言的结构体成员不能有初始化赋值(因 阅读全文
posted @ 2022-12-17 09:54 禅元天道 阅读(1041) 评论(0) 推荐(0) 编辑
摘要:1. 找到python头文件pyconfig.h,将 # define Py_DEBUG 注释掉(330行) 330 #ifdef _DEBUG331 #define Py_DEBUG // 将该行注释掉 332 #endif 2.找到以下代码(287行),将 pragma comment(lib, 阅读全文
posted @ 2022-09-08 22:47 禅元天道 阅读(1024) 评论(0) 推荐(0) 编辑
摘要:1 #ifndef CHANPROJECT_VECTOR2D_H 2 #define CHANPROJECT_VECTOR2D_H 3 #include "ChanGlobal.h" 4 5 namespace Common{ 6 template <typename T> 7 class Vect 阅读全文
posted @ 2022-08-28 11:25 禅元天道 阅读(57) 评论(0) 推荐(0) 编辑
摘要:C++中的delete与nullptr1 #include <iostream> 2 #include <list> 3 #include <string> 4 5 using namespace std; 6 7 8 class Geometry { 9 public: 10 string getName1() 11 { 12 ret 阅读全文
posted @ 2022-03-26 11:21 禅元天道 阅读(467) 评论(0) 推荐(0) 编辑
摘要:.h头文件是编译时必须的,lib是链接时需要的,dll是运行时需要的。附加依赖项的是.lib不是.dll,若生成了DLL,则肯定也生成 LIB文件。如果要完成源代码的编译和链接,有头文件和lib就够了。如果也使动态连接的程序运行起来,有dll就够了(放在Debug文件夹里)。在开发和调试阶段,当然最 阅读全文
posted @ 2021-09-02 10:53 禅元天道 阅读(587) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示