mercredi 23 mai 2018

Why do I need to explicitly write auto keyword?

I am moving towards C++11 from C++98 and became familiar with auto keyword. I was wondering why do we need to explicitly declare auto if compiler is able to automatically deduce the type. I know C++ is strongly typed language and this is a rule but was that not possible to achieve the same outcome without explicitly declaring a variable auto?

Aucun commentaire:

Enregistrer un commentaire