随笔分类 - 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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:#include <iostream> #include <numeric> #include <thread> #include <vector> template<typename Iterator, typename T> struct threadBlock { void operator(
阅读全文
摘要:在C-Free中编译简单的C++代码,发现报以上错误:ISO C++ forbids initialization of member `x'(ISO C++禁止初始化成员变量‘x’),经查阅资料: c++类基于C语言的结构体(struct),并添加了许多特性。C语言的结构体成员不能有初始化赋值(因
阅读全文
摘要:1. 找到python头文件pyconfig.h,将 # define Py_DEBUG 注释掉(330行) 330 #ifdef _DEBUG331 #define Py_DEBUG // 将该行注释掉 332 #endif 2.找到以下代码(287行),将 pragma comment(lib,
阅读全文
摘要: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
阅读全文
摘要:
1 #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
阅读全文

摘要:.h头文件是编译时必须的,lib是链接时需要的,dll是运行时需要的。附加依赖项的是.lib不是.dll,若生成了DLL,则肯定也生成 LIB文件。如果要完成源代码的编译和链接,有头文件和lib就够了。如果也使动态连接的程序运行起来,有dll就够了(放在Debug文件夹里)。在开发和调试阶段,当然最
阅读全文