摘要: 【参考链接】 https://www.cnblogs.com/weiyouqing/p/7544988.html 什么是虚函数: 虚函数是指一个类中你希望重载的成员函数 ,当你用一个 基类指针或引用 指向一个继承类对象的时候,调用一个虚函数时, 实际调用的是继承类的版本。 ——摘自MSDN 虚函数最 阅读全文
posted @ 2019-11-28 11:17 atoman 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <string.h> 3 #include "iostream" 4 5 typedef struct { 6 unsigned int dwMsgLen; 7 char ucMsg[0]; //柔性数组(零长数组) C99以上支持 8 阅读全文
posted @ 2019-11-25 22:36 atoman 阅读(1161) 评论(0) 推荐(0) 编辑
摘要: 1 #include "iostream" 2 3 using namespace std; 4 5 int main(void) 6 { 7 int a = 1000; 8 printf("%d\n", sizeof(a++)); 9 printf("%d\n", sizeof(++a)); 10 阅读全文
posted @ 2019-11-25 21:18 atoman 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 1.打开.bashrc文件 vim ~/.bashrc 1 # .bashrc 2 alias rm='rm -i' 3 alias cp='cp -i' 4 alias mv='mv -i' 5 alias xsymakeptmcu='./maketest process all fege_smf 阅读全文
posted @ 2019-11-25 08:49 atoman 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 版权声明:遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本文链接:https://blog.csdn.net/u012677715/article/details/77967774有些时候我们在定义一个类的时候不希望其中的拷贝控制成员(拷贝构造和拷贝赋值)起作用,也就是阻 阅读全文
posted @ 2019-11-14 08:21 atoman 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 比较常用的是 git clone git pull git add git commit (--amend) git push git stash git stash pop git reflog git reset --hard git reset --soft git rebase 不常用但非常 阅读全文
posted @ 2019-11-14 08:20 atoman 阅读(93) 评论(0) 推荐(0) 编辑
摘要: scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令,和它类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器,而且scp传输是加密的。可能会稍微影响一下速度。当你服务器硬盘变为只读 read only system时,用scp可以帮你把文件移出来。另外,scp还非常不 阅读全文
posted @ 2019-07-31 12:10 atoman 阅读(1002) 评论(1) 推荐(0) 编辑
摘要: Resource Acquisition Is Initialization, often referred to by the acronym RAII (or, erroneously, RIIA), is a popular design pattern in several object o 阅读全文
posted @ 2018-01-10 09:31 atoman 阅读(239) 评论(0) 推荐(0) 编辑
摘要: /*** a linked list demo by atoman ***/ #include <iostream> using namespace std; #if 1class nodelist{public: unsigned int uiNum; nodelist* pNext; //nod 阅读全文
posted @ 2017-12-27 17:44 atoman 阅读(209) 评论(0) 推荐(0) 编辑
摘要: #ifndef LEAPYEAR_INCLUDED#define LEAPYEAR_INCLUDED class LeapYear{public: bool IsLeapYear(int year);};#endif #include "leapyear.hpp" auto Or = [](bool 阅读全文
posted @ 2017-08-22 21:21 atoman 阅读(537) 评论(0) 推荐(0) 编辑