vendredi 3 juillet 2015

Is there any argument against declaring a variable in C++ with auto? [duplicate]

This question already has an answer here:

I find the auto keyword to be very useful as I don't have to worry about the type outcome of evaluating a complex expression or having to worry about which type to use (in terms of the right size) when initializing a variable. Besides backwards compatibility, is there any reason why I shouldn't use auto or circumstances in which it's not wise to do so ?

Aucun commentaire:

Enregistrer un commentaire