前言
类型推导
auto关键字
// 类型推导:编译器推导(类型推导绝对不是类型照抄)
#include <iostream>
#include <typeinfo>
using namespace std;
int main(void){
int a = 10;
auto b = a;
// auto:int b:int
cout <<"b的类型:" <<typeid(b).name() << endl;// i
cout << "&a:" << &a <<",&b:" << &b <<