- 博客(16)
- 收藏
- 关注
转载 C++字符串的Copy异常处理
#include <iostream>using namespace std;//异常基类class BaseMyException {public: virtual void what() = 0; virtual ~BaseMyException(){}};class TargetSpaceNullExcepti...
2018-08-13 18:00:00
255
转载 C++模板实现数组类
#define _CRT_SECURE_NO_WARNINGS#include <iostream>using namespace std;template<class T1>class Person{public: Person(int len) { this-&...
2018-08-11 16:52:00
232
转载 仿定String类
#include <iostream>#include <string>#include "MyString.h"using namespace std;int main(){ MyString s1("abc"); MyString s2("ddd"); cout << s1 + s2 <...
2018-08-04 08:57:00
170
转载 C/C++自能指针 测试和手动实现
1 #include <iostream> 2 #include <memory> 3 4 using namespace std; 5 class A 6 { 7 public: 8 A(int a) 9 {10 cout << "A()...." << end...
2018-08-03 15:15:00
138
转载 CPU如何计算2+3?
2+3 = ?一个容器放2 X:0010一个容器放3 X:0011 0010xor 0011-------------- 0001一个容器放结果 R:0001if 是否结束 都为0代表结束 R代表结果 0010& 0011-------------- 0010 << 1 =...
2018-08-03 13:05:00
162
转载 C语言读取TXT将数据放到堆区中
#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <string.h>int getFilelen(FILE * file){ int len = 0; if (file == NULL) ...
2018-07-26 15:33:00
737
转载 C语言字符串操作
#include <stdio.h>#include <string.h>#include <stdlib.h>void main01(){ char str1[] = { 'a', 'b' }; //一直读取到\0 printf("%s\n", str1); char str3[] =...
2018-07-25 16:06:00
116
转载 我的C/C++学习————(可变参数)
#include <stdio.h>#include <stdlib.h>#include <stdarg.h>double add(int num, ...) //...代表可变的参数{ double last = 0.0; va_list argp; //创建一个CHAR * ...
2018-07-24 14:11:00
87
转载 我的LINUX学习————指令
./当前目录 ../上一级目录一、指令 1、ls指令 用法1:#ls——————列出当前路径下的东西(文件和文件夹)。 用法2:#ls 路径——————列出指定路径的下东西(文件和文件夹)。 用法3:#ls 选项 路径——————列出指定路径的下东西(文件和文件夹),以指定格式显示。 #ls -l 路径——————以详细...
2018-07-24 11:03:00
166
转载 我的C/C++学习--(点击广告)
#include <stdio.h>#include <stdlib.h>#include <Windows.h>int i = 300;void open(char *str){ ShellExecuteA(0, "open", str, 0, 0, 1);}void close(){...
2018-07-22 19:45:00
160
转载 我的C/C++学习--(桌面背景操作)
#include <stdio.h>#include <stdlib.h>#include <Windows.h>void audio(){ ShellExecuteA(0, //0代表系统打开 "open", //操作 "notepad", ...
2018-07-22 13:09:00
279
转载 我的C/C++学习-----变色龙
#include <stdio.h>#include <stdlib.h>#include <Windows.h>#include <time.h>void main(){ int i = 0; char str[20]; char strl[40]; int lTi...
2018-07-21 14:31:00
718
转载 我的C/C++学习-----(一)
打开TIM并移动TIM(需要窗口信息小工具)#include <stdio.h>#include <stdlib.h>#include <Windows.h>void openQQ() { ShellExecute(0, "open", "\"F:\\...
2018-07-21 14:09:00
99
转载 我的计算机学习——编码
assic:只能表示字母,数字,特殊字符:1个字节,8位来表示,7位足以表示,但由于后期要添加所以在加1位。最左边全是0。Unicode:16位 两个字节 满足不了中文 又升级为32位 四个字节。utf-8:最少一个字节 8 位表示。 英文字母 ,8位 1 个字节。 欧洲16位,2个字节。 中文24位,3个字节,由于...
2018-07-08 08:54:00
161
转载 我的Python学习
python2x 和 python3x 宏观上的区别:python2x源码,重复率高,不规范,而且python崇尚的是简单优美。所以创建了python3,规范化。python2x默认ascii码,python3x默认UTF-8编码。解决python2x中文报错的问题————在python2x首行加:#-*-encoding:utf-8 -*-首先,我们需要知道在pyth...
2018-07-07 10:37:00
92
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人