摘要: // 设计模式2-抽象工厂模式.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 //https://www.runoob.com/design-pattern/abstract-factory-pattern.html 抽象工厂模式(Abstract Factory Pat 阅读全文
posted @ 2021-02-19 19:16 iwetuan 阅读(62) 评论(0) 推荐(0) 编辑
摘要: // 设计模式1工厂模式.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 //https://www.runoob.com/design-pattern/factory-pattern.html //在工厂模式中,我们在创建对象时不会对客户端暴露创建逻辑,并且是通过使用一个 阅读全文
posted @ 2021-02-19 10:55 iwetuan 阅读(50) 评论(0) 推荐(0) 编辑
摘要: // ConsoleApplication25单例.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> //#include <iostream> //singleton //单例方法,实现单例的测试程序 class Ca { pu 阅读全文
posted @ 2021-02-18 18:53 iwetuan 阅读(58) 评论(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 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> class Ca { public: virtual void print() { std::cout << "Ca::print" <<std::endl; } void print2() { print(); } }; class Cb :public C 阅读全文
posted @ 2021-01-31 19:05 iwetuan 阅读(759) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/smstong/article/details/44338837 声明时注意 这样才可以导出接口 class FBX3DX_EXPORT Widget :public QWidget 阅读全文
posted @ 2021-01-27 21:13 iwetuan 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 使用动态库发布的一个好处是,如果只是更新了接口的内部实现,可以直接替换动态库而不需要像静态库一样加入到编译环境重新链接 CMakeLists.txt cmake_minimum_required(VERSION 3.17) project(dtest) include(GenerateExportH 阅读全文
posted @ 2021-01-26 12:45 iwetuan 阅读(1184) 评论(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 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 打开 语法 cl /d1reportSingleClassLayoutXXX yyy.cpp 注意那个是数字 1 用例 cl /d1reportSingleClassLayoutV3 vbptr.cpp 输出结果 vbptr.cpp vbptr.cpp: warning C4819: 该文件包含不能 阅读全文
posted @ 2021-01-11 14:49 iwetuan 阅读(360) 评论(0) 推荐(0) 编辑
摘要: ??疑问点,为何在获取VBTable的偏移地址时,在x64中需要使用 int**指针类型呢, 莫非VBTable的实现,在VS中使用的 int[] 类型,而不是跟着x86,x64改变? // vbptr.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include 阅读全文
posted @ 2021-01-11 14:45 iwetuan 阅读(98) 评论(0) 推荐(0) 编辑