摘要: 定义别名: 阅读全文
posted @ 2018-07-13 22:56 confusion 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-07-13 22:13 confusion 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 迭代器类型: begin和end的返回值的类型由对象是否为常量所决定 无论对象是都为常量,cbegin和cend都将都到一个const_iterator 阅读全文
posted @ 2018-07-06 18:31 confusion 阅读(134) 评论(0) 推荐(0) 编辑
摘要: vector存放类型不同,{}有些区别-: vector的size的返回类型: push_back的使用: 要防止缓冲区溢出,使用范围for语句: 阅读全文
posted @ 2018-07-05 19:22 confusion 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 当在两个文件定义了同名的const变量时,相对于定义了两个独立的变量 想要在一个文件中定义一个const变量并在其他文件中使用他:不管时声明还是定义,都加上extern关键字 因为const对象一经初始化就不能更改,所以创建const变量的时候必须要将他初始化 const变量可以赋值给非const变 阅读全文
posted @ 2018-07-04 21:29 confusion 阅读(1658) 评论(0) 推荐(0) 编辑
摘要: 引用相当于给一个对象起个别名 必须初始化 引用只是与一个对象bind,所以引用无法改变 引用不是一个对象,所以没有引用的引用 引用的初始化值必须是一个对象,而不能是字面量或表达式 引用不是地址,所以引用没有地址 阅读全文
posted @ 2018-07-04 20:53 confusion 阅读(94) 评论(0) 推荐(0) 编辑
摘要: draw.io 阅读全文
posted @ 2018-07-01 19:11 confusion 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 有关输出对齐 int main(int argc, char* argv[]){ char insertTime[20] = {"1234567890"}; double insertTime1 = 12321; printf("|%-15s|/n",insertTime); //左对齐,15位长度 阅读全文
posted @ 2018-06-29 19:36 confusion 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 把QString写到文件中可以用toutf8()函数 QByteArray QString::toUtf8() const Returns a UTF-8 representation of the string as a QByteArray. UTF-8 is a Unicode codec a 阅读全文
posted @ 2018-06-29 19:28 confusion 阅读(3169) 评论(1) 推荐(0) 编辑
摘要: 今天发现,\r\n才能换行,好像记事本不能改。 阅读全文
posted @ 2018-06-29 18:36 confusion 阅读(678) 评论(0) 推荐(0) 编辑