tags:

views:

74

answers:

1
A: 

It's useless and is left for old code compatibility. Long ago you used it to say that a variable is automatic, this is no longer useful - all variables witout other qualifiers are treated as automatic (stack-allocated).

sharptooth
Actually, as of C++0x, auto has been moved back into the spotlight. It's now used for automatic type inference, quite like var in C#. E.g. auto it = myvec.begin();
Andreas Magnusson