//auto类型说明符 auto i = 0, *p = &i; //i是整数、p是整型指针 auto sz = 0, pi = 3.14; // 错误:sz和pi的类型不一致
//auto会忽略顶层const,保留底层const constint ci = i, &cr = ci; auto b = ci; //b是整型(const被忽略) auto c = cr; //c是整型(cr为ci的引用,ci是const int,但const被忽略) auto d = &i; //d是指向i的整型指针 //e是指向ci这个对象的整型常量的指针(对常量对象取地址是一种底层const) auto e = &cr;