摘要: 1.无法下载或者下载停止 确保网络连接 更新软件源为国内 2.无法解压 抛错:Not enough free space to extract VMwareTools-9.6.5-2700 解决方案:这可能是Linux的代码缺陷,我也不太清楚其中的原理,但是解决方法是,将此文件夹复制到另外一个文件夹 阅读全文
posted @ 2020-04-17 09:27 今天的小马同学 阅读(1070) 评论(0) 推荐(0)
摘要: 1.代码 #include <string> using namespace std; void teststr(string& str) { cout<<str<<endl; } void testint(int &a) { cout<<a<<endl; } int main() { string 阅读全文
posted @ 2020-04-15 13:48 今天的小马同学 阅读(2250) 评论(0) 推荐(0)
摘要: typeid是c++的关键字,typeid操作符的返回结果是名为type_info的标准库类型的对象的引用(在头文件typeinfo中定义) ISO C++标准并没有确切定义type_info,它的确切定义编译器相关的,但是标准却规定了其实现必需提供如下四种操作: type_info类提供了publ 阅读全文
posted @ 2020-04-03 14:57 今天的小马同学 阅读(845) 评论(0) 推荐(0)
摘要: 定义一个map用来演示本次的遍历: std::map<int, std::string> test; test.insert(std::make_pair(1, "Test")); test.insert(std::make_pair(2, "Product")); 方式1:利用迭代器 //1.1 阅读全文
posted @ 2020-04-02 13:15 今天的小马同学 阅读(7904) 评论(0) 推荐(1)
摘要: 1.简单工厂模式(Simple Factory Pattern) 一个工厂生产所有的产品,根据输入参数决定产品的种类。 #include "Factory.h" #include "ProductA.h" #include "ProductB.h" Product* Factory::createP 阅读全文
posted @ 2020-03-29 22:32 今天的小马同学 阅读(498) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/stonemjl/p/12582285.html 阅读全文
posted @ 2020-03-27 16:27 今天的小马同学 阅读(304) 评论(0) 推荐(0)
摘要: 普通指针与share_ptr的互相转换: struct test { int num; string name; }; test* pTest = new test(); std::shared_ptr<test> ptr_test = std::shared_ptr<test>(pTest); / 阅读全文
posted @ 2020-03-27 11:09 今天的小马同学 阅读(2459) 评论(0) 推荐(0)
摘要: 1. 基本的介绍和使用 参考菜鸟教程的相关介绍,涉及各种构造函数和其他成员函数的使用。 https://www.runoob.com/w3cnote/cpp-std-thread.html 下面这篇文章也有比较丰富的使用例子: https://blog.csdn.net/ouyangfushu/ar 阅读全文
posted @ 2020-03-20 12:15 今天的小马同学 阅读(1804) 评论(0) 推荐(1)
摘要: 本文列举记录了本人从事Windows平台软件开发两年以来使用的工具,持续更新中。 1. 文本编辑类 Notepad++ Notepad++是Windows操作系统下的一套文本编辑器,有完整的中文化接口及支持多国语言编写的功能。除了适合制作一般的纯文字说明文件,也十分适合编写计算机程序代码。Notep 阅读全文
posted @ 2020-02-01 20:45 今天的小马同学 阅读(1681) 评论(0) 推荐(0)