1.

What Is The Auto Keyword Good For In C++?

Answer»

LOCAL variables OCCUR within a scope; they are "local" to a function. They are often called automatic variables because they automatically come into being when the scope is entered and automatically go away when the scope closes. The keyword auto MAKES this explicit, but local variables DEFAULT to auto auto auto auto so it is never necessary to declare something as an auto auto auto auto.

Local variables occur within a scope; they are "local" to a function. They are often called automatic variables because they automatically come into being when the scope is entered and automatically go away when the scope closes. The keyword auto makes this explicit, but local variables default to auto auto auto auto so it is never necessary to declare something as an auto auto auto auto.



Discussion

No Comment Found