摘要: 再说constexpr之前我们先了解下const const 我是参考这个博主的https://www.cnblogs.com/wintergrass/archive/2011/04/15/2015020.html const是C语言的一种关键字,它所限定的变量是不允许被改变的,从而起到保护的作用! 阅读全文
posted @ 2021-09-16 11:25 冰糖葫芦很乖 阅读(625) 评论(0) 推荐(0) 编辑
摘要: 以往我们定义空指针都是 int* p = NULL; 但是....NULL 在C++中被定义为 于是有了以下试验 #include <iostream> #include <sstream> #include <vector> using namespace std; void func(int* 阅读全文
posted @ 2021-09-16 09:25 冰糖葫芦很乖 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 原始字面量:在R “xxx(raw string)xxx” 中,原始字符串必须用括号()括起来,括号的前后可以加其他字符串,所加的字符串会被忽略,但是必须加的是一模一样的前面abb 后面也得abb string a = "\yyy"; string b = R"(\yyy)"; string c = 阅读全文
posted @ 2021-09-16 09:11 冰糖葫芦很乖 阅读(160) 评论(0) 推荐(0) 编辑