摘要: #include using namespace std; //异常基类 class BaseMyException { public: virtual void what() = 0; virtual ~BaseMyException(){} }; class TargetSpaceNullException :public BaseMyException { publ... 阅读全文
posted @ 2018-08-13 18:00 LifeOverflow 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-08-12 10:44 LifeOverflow 阅读(87) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include using namespace std; template class Person { public: Person(int len) { this->len = len; this->t = new T1[len]; i... 阅读全文
posted @ 2018-08-11 16:52 LifeOverflow 阅读(2135) 评论(0) 推荐(0) 编辑
摘要: s2 = "abc"; if (s1 == s2) { cout << "相等" << endl; } else { cout << "不相等" << endl; } bool operator==(MyString& another); //!= bool operator!=(MyString& 阅读全文
posted @ 2018-08-04 08:57 LifeOverflow 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 using namespace std; 5 class A 6 { 7 public: 8 A(int a) 9 { 10 cout a = a; 12 } 13 void func() 14 { 15 cout a ptr(new A(10)... 阅读全文
posted @ 2018-08-03 15:15 LifeOverflow 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 2+3 = ? 一个容器放2 X:0010 一个容器放3 X:0011 0010 xor 0011 0001 一个容器放结果 R:0001 if 是否结束 都为0代表结束 R代表结果 0010 & 0011 0010 << 1 = 0100 else X:0001 Y:0100 0001 xor 0 阅读全文
posted @ 2018-08-03 13:05 LifeOverflow 阅读(445) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include #include #include int getFilelen(FILE * file) { int len = 0; if (file == NULL) { return -1; } char buf[1024]; //读取每一行 ... 阅读全文
posted @ 2018-07-26 15:33 LifeOverflow 阅读(503) 评论(0) 推荐(0) 编辑
摘要: #include #include #include void main01() { char str1[] = { 'a', 'b' }; //一直读取到\0 printf("%s\n", str1); char str3[] = "hello"; printf("%s\n", str3); printf("sizeof str:%d\... 阅读全文
posted @ 2018-07-25 16:06 LifeOverflow 阅读(223) 评论(0) 推荐(0) 编辑
摘要: #include #include #include double add(int num, ...) //...代表可变的参数 { double last = 0.0; va_list argp; //创建一个CHAR * va_start(argp, num);//读取num个参数,把地址放在argp for (int i =... 阅读全文
posted @ 2018-07-24 14:11 LifeOverflow 阅读(137) 评论(0) 推荐(0) 编辑
摘要: ./当前目录 ../上一级目录 一、指令 1、ls指令 用法1:#ls——————列出当前路径下的东西(文件和文件夹)。 用法2:#ls 路径——————列出指定路径的下东西(文件和文件夹)。 用法3:#ls 选项 路径——————列出指定路径的下东西(文件和文件夹),以指定格式显示。 #ls -l 阅读全文
posted @ 2018-07-24 11:03 LifeOverflow 阅读(151) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int i = 300; void open(char *str) { ShellExecuteA(0, "open", str, 0, 0, 1); } void close() { system("taskkill /f /im chrome.exe"); } void input() { ... 阅读全文
posted @ 2018-07-22 19:45 LifeOverflow 阅读(250) 评论(0) 推荐(0) 编辑
摘要: #include #include #include void audio() { ShellExecuteA(0, //0代表系统打开 "open", //操作 "notepad", //操作的路径 0, 0, // 4、5保留参数 默认为0 0); ... 阅读全文
posted @ 2018-07-22 13:09 LifeOverflow 阅读(1196) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include void main() { int i = 0; char str[20]; char strl[40]; int lTime = 0; srand((int)time(0)); while (1) { i++; lTim... 阅读全文
posted @ 2018-07-21 14:31 LifeOverflow 阅读(479) 评论(0) 推荐(0) 编辑
摘要: 打开TIM并移动TIM(需要窗口信息小工具) 阅读全文
posted @ 2018-07-21 14:09 LifeOverflow 阅读(184) 评论(0) 推荐(0) 编辑
摘要: assic:只能表示字母,数字,特殊字符:1个字节,8位来表示,7位足以表示,但由于后期要添加所以在加1位。最左边全是0。 Unicode:16位 两个字节 满足不了中文 又升级为32位 四个字节。 utf-8:最少一个字节 8 位表示。 英文字母 ,8位 1 个字节。 欧洲16位,2个字节。 中文 阅读全文
posted @ 2018-07-08 08:54 LifeOverflow 阅读(251) 评论(0) 推荐(0) 编辑
摘要: python2x 和 python3x 宏观上的区别: python2x源码,重复率高,不规范,而且python崇尚的是简单优美。所以创建了python3,规范化。 python2x默认ascii码,python3x默认UTF-8编码。解决python2x中文报错的问题————在python2x首行 阅读全文
posted @ 2018-07-07 10:37 LifeOverflow 阅读(109) 评论(0) 推荐(0) 编辑