visual studio 2008 c++如何声明auto变量?

[复制链接]
查看11 | 回复2 | 2013-2-25 22:02:46 | 显示全部楼层 |阅读模式
vs2010 Help: The auto keyword is a declaration specifier. However, the C++ standard defines an original and a revised meaning for this keyword. Before Visual C++ 2010, the auto keyword declares a variable in the automatic storage class; that is, a variable that has a local lifetime. Starting with Visual C++ 2010, theauto...
回复

使用道具 举报

千问 | 2013-2-25 22:02:46 | 显示全部楼层
auto是存储类型标识符,表明变量(自动)具有本地范围,块范围的变量声明(如for循环体内的变量声明)默认为auto存储类型。所以你声明的时候应该是auto int i;...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行