随笔分类 -  c/c++

1
摘要:en.stsw-link007-v3-16-8 stlinkv2固件升级,驱动升级 阅读全文
posted @ 2025-05-23 15:38 iwetuan 阅读(209) 评论(0) 推荐(0)
摘要:#include // class Base { public: Base() { stdcout << "base" << stdendl; } }; class Ca { public: Ca() { stdcout << "ca" << stdendl; } }; //初始化顺序 //1.基类 阅读全文
posted @ 2021-11-30 10:31 iwetuan 阅读(98) 评论(0) 推荐(0)
摘要:转载 https://www.cnblogs.com/yimaochun/archive/2011/07/29/2120653.html 在.Cxx文件添加 #pragma comment( linker, "/subsystem:"windows" /entry:"mainCRTStartup"" 阅读全文
posted @ 2021-10-15 13:58 iwetuan 阅读(489) 评论(0) 推荐(0)
摘要:注意点1: 类中的operator new 和operator delete为static 遵循 访问限制 注意点2 operator delete 和operator new的第一个参数固定,通过第二个参数匹配new和delete 注意点3 operator delete,会在构造函数发生异常时自 阅读全文
posted @ 2021-09-15 10:32 iwetuan 阅读(168) 评论(0) 推荐(0)
摘要:CMakeLists.txt cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13) #项目名称 project(cwrapcpp) #要放到这个位置,表示之后添加的源文件,都是用utf8编码 add_com 阅读全文
posted @ 2021-09-08 18:48 iwetuan 阅读(256) 评论(0) 推荐(0)
摘要:// Demo_3_Show_PointCloud.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // 功能:显示简单的三维坐标点集 #include <iostream> #include "vtkPoints.h" #include "vtkPolyData.h" # 阅读全文
posted @ 2021-07-20 10:32 iwetuan 阅读(239) 评论(0) 推荐(0)
摘要:#include <string> #include <vector> #include <algorithm> #include <iostream> #include <functional> using namespace std; struct Memfn{ Memfn(string s): 阅读全文
posted @ 2021-06-29 22:38 iwetuan 阅读(60) 评论(0) 推荐(0)
摘要:// ConsoleApplication7.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <chrono> #include <iostream> using namespace std; //判断平年和闰年的方法 int days(in 阅读全文
posted @ 2021-06-22 03:25 iwetuan 阅读(595) 评论(0) 推荐(0)
摘要:为什么C++的空类的size不能为0 Why is the size of an empty class not zero? To ensure that the addresses of two different objects will be different. For the same r 阅读全文
posted @ 2021-02-24 18:28 iwetuan 阅读(122) 评论(0) 推荐(0)
摘要:// C++继承构造.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 //VS2017社区版 #include <iostream> struct Base { Base(int, int) { std::cout << "Base(int, int)" << std::e 阅读全文
posted @ 2021-02-24 18:21 iwetuan 阅读(78) 评论(0) 推荐(0)
摘要:// 设计模式2-抽象工厂模式.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 //https://www.runoob.com/design-pattern/abstract-factory-pattern.html 抽象工厂模式(Abstract Factory Pat 阅读全文
posted @ 2021-02-19 19:16 iwetuan 阅读(92) 评论(0) 推荐(0)
摘要:// 设计模式1工厂模式.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 //https://www.runoob.com/design-pattern/factory-pattern.html //在工厂模式中,我们在创建对象时不会对客户端暴露创建逻辑,并且是通过使用一个 阅读全文
posted @ 2021-02-19 10:55 iwetuan 阅读(80) 评论(0) 推荐(0)
摘要:从下面的例子可以大概看出来, 编译器处理模板的时候,只看模板的名称, 不关注模板的继承和实现 #include <iostream> struct Ca {}; struct Cb {}; template<typename t,typename t2=void> struct Cc :Ca { C 阅读全文
posted @ 2021-02-02 12:13 iwetuan 阅读(190) 评论(0) 推荐(0)
摘要:OCC的软件版本为7.5 编译器为VS2013 只编译了必须的FreeType和tcltk 编译tcltk时,参考官方编译手册 如果你需要具体的编译过程, 请联系iwetuan@126.com (https://kdocs.cn/l/ce5cGGrOCT9A [金山文档] OCCT7.5_VS201 阅读全文
posted @ 2021-01-20 19:34 iwetuan 阅读(429) 评论(0) 推荐(0)
摘要:打开 语法 cl /d1reportSingleClassLayoutXXX yyy.cpp 注意那个是数字 1 用例 cl /d1reportSingleClassLayoutV3 vbptr.cpp 输出结果 vbptr.cpp vbptr.cpp: warning C4819: 该文件包含不能 阅读全文
posted @ 2021-01-11 14:49 iwetuan 阅读(410) 评论(0) 推荐(0)
摘要:??疑问点,为何在获取VBTable的偏移地址时,在x64中需要使用 int**指针类型呢, 莫非VBTable的实现,在VS中使用的 int[] 类型,而不是跟着x86,x64改变? // vbptr.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include 阅读全文
posted @ 2021-01-11 14:45 iwetuan 阅读(130) 评论(0) 推荐(0)
摘要:转载 VS初始化,恢复到刚安装完成的状态 第一个方法:(已测试成功) 输入DOS命令: CD Common7/IDE 回车 输入:devenv.exe /setup /resetuserdata /resetsettings,重置Visual Studio 即可 执行工作之后,重新打开VS会出现安装 阅读全文
posted @ 2020-12-31 12:17 iwetuan 阅读(288) 评论(0) 推荐(0)
摘要:// ConsoleApplication6.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include <string> #include <deque> #include <vector> #include <arra 阅读全文
posted @ 2020-12-11 12:43 iwetuan 阅读(352) 评论(0) 推荐(0)
摘要:C语言中数组名可以在传引用时自动转换为指针 例如 int l[2][3] void myPrint(int** ary){ //可以转换为 int(*)[3]类型进行行列 //也可以直接 int** 操作 } myPrint(l) 如何高效率的引用在myPrint中的ary呢 从一个例子入手 #in 阅读全文
posted @ 2020-08-11 11:11 iwetuan 阅读(456) 评论(0) 推荐(0)
摘要:msys2包含mingw32和mingw64 步骤1 首选安装msys64 链接: "https://pan.baidu.com/s/1l9Zfm4TE1Gg3c7tkaH6KeQ" 安装到指定目录 步骤2 修改更新源 进入msys64/etc/pacman.d/目录中,分别在三个文件中增加 mir 阅读全文
posted @ 2018-11-29 03:29 iwetuan 阅读(7165) 评论(0) 推荐(0)

1