会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
saintdingtheGreat
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
···
38
下一页
2020年2月1日
c++模板杂谈
摘要: 实验环境 linux mint 下 Qt 5.11 说白了,模板就是搭个函数,类的框架,具体实现的时候往里面填充内容,或者我们可以把类型名想作一个占位符号 函数模板 俗气的比大小 #include <iostream> #include<string.h> using namespace std;
阅读全文
posted @ 2020-02-01 00:56 saintdingtheGreat
阅读(169)
评论(0)
推荐(0)
2020年1月23日
用C实现插入排序和快速排序
摘要: 插入排序 插入这词太具有欺骗性,并不是说在已经生成的数组中又插进来一个什么新的数,而是从数组元素中选出一个“标杆”元素(按索引遍历),让这个元素和之前的元素进行比较,直到找出一个元素大于这个“标杆”元素进行交换。 这样一来,我们大概可以构建出两层循环 外循环负责遍历数组,每次选出新的标杆元素, 内层
阅读全文
posted @ 2020-01-23 14:42 saintdingtheGreat
阅读(284)
评论(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
阅读(262)
评论(0)
推荐(0)
2020年1月16日
什么?laravel没有.env?最终,坑程序员的是系统环境配置
摘要: 实验环境 linux mint 9 fedora31 centos7 laravel 6.8/6.11 今儿难得醒来的早,心情不错说鼓捣鼓捣laravel,之前虽说也用过,但是总觉得用的不够好,一些高级特性没用出来,谁知刚一用数据库的表迁移,添堵的事就来了...... 一运行php artisian
阅读全文
posted @ 2020-01-16 12:40 saintdingtheGreat
阅读(1221)
评论(0)
推荐(0)
2020年1月14日
c++中类初始化赋值过程中字符串作为参数的问题
摘要: 先看一段类代码的定义: 类的头文件 #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
阅读(1383)
评论(0)
推荐(0)
2020年1月13日
c++ auto关键字
摘要: 一些关于C++的出版物写到:我们经常会用到一些赋值操作,例如int a=6,前提是我们知道变量的类型。 但我们经常不知道变量的类型,因此就要允许c++编译器帮我们判断变量类型,由此auto变量应孕而生 一般用法 #include<iostream> using namespace std; int
阅读全文
posted @ 2020-01-13 16:16 saintdingtheGreat
阅读(240)
评论(0)
推荐(0)
c++构造函数之拷贝构造函数
摘要: 一般在定义一个类时,我们会考虑这个类的4种关键行为(例如复制,赋值,移动,销毁)如何定义,相对应的就有拷贝构造函数,拷贝赋值运算符,移动构造函数,移动赋值运算符,析构函数 类的复制 拷贝构造函数 类的赋值 拷贝赋值运算 类的移动 移动构造函数/移动赋值运算 类的销毁 析构函数 类的拷贝构造函数带来的
阅读全文
posted @ 2020-01-13 15:54 saintdingtheGreat
阅读(111)
评论(0)
推荐(0)
2020年1月12日
linux C孤儿进程以及进程回收
摘要: 上机环境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
阅读(743)
评论(0)
推荐(0)
2020年1月11日
linux C进程的执行函数exec系列
摘要: 实验环境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
阅读(684)
评论(0)
推荐(0)
linux下转windows字符串----如果windows下的记事本在linux下是一堆乱码怎么办
摘要: 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
阅读(270)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
38
下一页
公告