上一页 1 2 3 4 5 6 7 8 ··· 38 下一页
摘要: 实验环境 linux mint 下 Qt 5.11 说白了,模板就是搭个函数,类的框架,具体实现的时候往里面填充内容,或者我们可以把类型名想作一个占位符号 函数模板 俗气的比大小 #include <iostream> #include<string.h> using namespace std; 阅读全文
posted @ 2020-02-01 00:56 saintdingtheGreat 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 插入排序 插入这词太具有欺骗性,并不是说在已经生成的数组中又插进来一个什么新的数,而是从数组元素中选出一个“标杆”元素(按索引遍历),让这个元素和之前的元素进行比较,直到找出一个元素大于这个“标杆”元素进行交换。 这样一来,我们大概可以构建出两层循环 外循环负责遍历数组,每次选出新的标杆元素, 内层 阅读全文
posted @ 2020-01-23 14:42 saintdingtheGreat 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 上机环境:操作系统windows10,开发环境vs2017 生成一组10个随机数并写入文件 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<time.h> void genarray(int 阅读全文
posted @ 2020-01-23 11:58 saintdingtheGreat 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 实验环境 linux mint 9 fedora31 centos7 laravel 6.8/6.11 今儿难得醒来的早,心情不错说鼓捣鼓捣laravel,之前虽说也用过,但是总觉得用的不够好,一些高级特性没用出来,谁知刚一用数据库的表迁移,添堵的事就来了...... 一运行php artisian 阅读全文
posted @ 2020-01-16 12:40 saintdingtheGreat 阅读(1188) 评论(0) 推荐(0) 编辑
摘要: 先看一段类代码的定义: 类的头文件 #pragma once #include<iostream> using namespace std; class mycoach { public: char name[30]; int age; char expertise[60]; char foods[ 阅读全文
posted @ 2020-01-14 00:19 saintdingtheGreat 阅读(1348) 评论(0) 推荐(0) 编辑
摘要: 一些关于C++的出版物写到:我们经常会用到一些赋值操作,例如int a=6,前提是我们知道变量的类型。 但我们经常不知道变量的类型,因此就要允许c++编译器帮我们判断变量类型,由此auto变量应孕而生 一般用法 #include<iostream> using namespace std; int 阅读全文
posted @ 2020-01-13 16:16 saintdingtheGreat 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 一般在定义一个类时,我们会考虑这个类的4种关键行为(例如复制,赋值,移动,销毁)如何定义,相对应的就有拷贝构造函数,拷贝赋值运算符,移动构造函数,移动赋值运算符,析构函数 类的复制 拷贝构造函数 类的赋值 拷贝赋值运算 类的移动 移动构造函数/移动赋值运算 类的销毁 析构函数 类的拷贝构造函数带来的 阅读全文
posted @ 2020-01-13 15:54 saintdingtheGreat 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 上机环境linux mint下 Qt5.11 一例孤儿进程代码的演示 #include<stdio.h> #include<stdlib.h> #include<string.h> #include<unistd.h> #include<sys/types.h> #include<fcntl.h> 阅读全文
posted @ 2020-01-12 13:24 saintdingtheGreat 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 实验环境linux mint下面 QT5.11 execlp失败时返回 #include<stdio.h> #include<stdlib.h> #include<string.h> #include<unistd.h> #include<sys/types.h> int main() { pid_ 阅读全文
posted @ 2020-01-11 15:30 saintdingtheGreat 阅读(663) 评论(0) 推荐(0) 编辑
摘要: iconv命令 iconv -f gb2312 -t utf8 a.txt > 2.txt 其中iconv是linux下的一道shell命令 a.txt是源文件,也就是从windows复制过来的文件,2.txt是linux系统下的目标文件。 阅读全文
posted @ 2020-01-11 13:53 saintdingtheGreat 阅读(263) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 38 下一页