c++ primer note

---恢复内容开始---

1.decltype

2.auto

3.cbegin

4.cend

5.constexpr

6.(*Parray)[10]=&arr; //Parray 指向一个含有10个整数的数组

7.(&arrRef)[10]=arr;   //arrRef 引用一个含有10个整数的数组

8.goto

9.throw,try....catch,terminate,exception

10.main函数传参。prog -d  -o  ofile data0   int main(int argc,char * argv[])

11.initializer_list

12.返回局部对象的引用时错误的,返回局部对象的指针也是错误的

13.const_cast

14.默认实参只能省略尾部的实参,一旦某个形参被赋予了默认值,它后面的所有形参都必须有默认值

15.constexpr 函数

16.assert(cassert)和NDEBUG,__func__(输出当前调试函数的名字)

17.decltype作用与函数和数组的时候返回的是本来类型而不是指针,创建函数指针的时候与函数名并没有什么关系,主要是返回类型和形参

18.定义在类内部的是隐式的inline函数

19.常量成员函数

20.构造参数初始化:Sales_data(const std::string &s):bookNo(s){}其他默认初始化,read,print,istream,ostream

21.using pso=std::string::size_type; 等价于typedef std::string::size_type pos;

22.为成员就爱上mutable 这样即使在const对象,函数里面也可以被修改

23.

---恢复内容结束---

原文地址:https://www.cnblogs.com/thefirstfeeling/p/5849189.html