C++ 98标准/C++03标准
同C语言的意思完全一样:auto被解释为一个自动存储变量的关键字,也就是申明一块临时的变量内存。
C++ 11标准
在C++11标准的语法中,auto被定义为自动推断变量的类型。例如:
auto x=5.2;//这里的x被auto推断为double类型
map<int,int>m;
for(auto it=m.begin();//这里it被auto推断为map<int,int>::iterator类型
it!=m.end();++it)
{
//….
}
不过C++11的auto关键字时有一个限定条件,那就是必须给申明的变量赋予一个初始值,否则编译器在编译阶段将会报错。
Really loads of good material! Acyclovir Generic Price Philippines
Thank you. I like it. advair diskus
This is nicely expressed! . https://viagrapython.com/
Nicely put, With thanks! cheap viagra
Kudos. Helpful stuff! generic cialis
Very good content. Regards! zovirax pill
Amazing a good deal of superb information! canadian pharmacies shipping to usa