2020年4月1日
摘要:
# Rename branch locally git branch -m old_branch new_branch # Delete the old branch git push origin :old_branch # Push the new branch, set local branc
阅读全文
posted @ 2020-04-01 16:47
莫水千流
阅读(798)
推荐(0)
摘要:
The Rebase command allows you to apply commits from one branch to another. Rebase can be viewed as more powerful version of Cherry-Pick, which is opti
阅读全文
posted @ 2020-04-01 10:43
莫水千流
阅读(798)
推荐(0)
摘要:
'Normal' Merge In case of a normal merge, a merge commit with at least two parent commits (i.e., the last from the current branch and the last from th
阅读全文
posted @ 2020-04-01 10:42
莫水千流
阅读(1044)
推荐(0)
2019年8月22日
摘要:
成员指针解引用操作符(.*)从对象或引用获取成员*成员指针箭头操作符(->*)通过对象的指针获取成员 类成员函数指针定义 因为函数是一个类的成员,所以它的指针定义有别于全局函数,格式如下: typedef 返回值(类名::*函数指针类型名称)(参数列表); 需要注意的地方 1) 使用typedef创
阅读全文
posted @ 2019-08-22 15:08
莫水千流
阅读(3676)
推荐(0)
2019年6月21日
摘要:
环境 1.Windows 10 -x64; 2.MSVC 2013 -x64; 3.Qt5.5.1 -x86 and -x64。 编译过程 准备工作 1、安装ActivePerl 安装过程同一般软件安装。 2、下载QtCharts源码 git clone https://github.com/qt/
阅读全文
posted @ 2019-06-21 17:35
莫水千流
阅读(2481)
推荐(0)
2019年3月30日
摘要:
float x; 千万不要写x==0; 写出float x 与“零值”比较的if语句——一道面试题分析 写出float x 与“零值”比较的if语句 请写出 float x 与“零值”比较的 if 语句: const float EPSINON = 0.00001; if ((x >= - EPSI
阅读全文
posted @ 2019-03-30 07:16
莫水千流
阅读(5031)
推荐(1)
摘要:
因为double类型或float类型都是有精度的,其实都是取的近似值,所以有个误差。和一个很小的数比如0.00000001(1e-8)比较就是为了在这个误差范围内进行比较。 举个例子如double b = 0.123456可能是0.1234561的四舍五入后得到的结果。最后的0.0000001就表示
阅读全文
posted @ 2019-03-30 07:09
莫水千流
阅读(989)
推荐(0)
2019年3月13日
摘要:
const的用法,特别是用在函数后面 在普通的非 const成员函数中,this的类型是一个指向类类型的 const指针。可以改变this所指向的值,但不能改变 this所保存的地址。 在 const成员函数中,this的类型是一个指向 const类类型对象的 const指针。既不能改变 this所
阅读全文
posted @ 2019-03-13 22:11
莫水千流
阅读(3490)
推荐(0)
2019年3月12日
摘要:
当我们在用C++做底层驱动的时候,经常会遇到内存不足的警告,究其原因,往往是因为内存出现溢出,泄露或者越界等原因。那么他们之间有什么联系吗? 内存溢出(out of memory)是指程序在申请内存时,没有足够的内存空间供其使用。 内存泄漏(memory leak)是指程序在申请内存后,无法释放已申
阅读全文
posted @ 2019-03-12 23:31
莫水千流
阅读(4387)
推荐(1)
摘要:
关于C++的内存处理,可分为三大块,分别是: (一)内存管理机制 (二)内存泄露处理 (三)内存回收机制 这篇文章将就(一)内存管理机制 进行深入探讨,如有错误欢迎大家指正。 C++的内存管理也可细分为 1. 程序内存布局 2. 内存的分配方式 3. 常见内存错误及对策 一. 程序内存布局 查了相关
阅读全文
posted @ 2019-03-12 23:30
莫水千流
阅读(1725)
推荐(0)