3 ms·
> what if i used auto as a var name in my code Then you had a syntax error. This is a historic keyword that played a useful role in Dennis Ritchie's B and NB l
by kazinator 5y ago
> what if i used auto as a var name in my code
Then you had a syntax error. This is a historic keyword that played a useful role in Dennis Ritchie's B and NB languages, predecessor to C. It was retained as a reserved keyword in C, and into C++.
The use of auto in relation to type inference in modern C++ is a repurposing of the existing useless keyword that has always been there.
- uwagar 5y agocool thanks, my bad. but i like to see the types im working with. auto like another poster has said though makes it readable kinda hides the type which idiomatically / stylistically i'm not comfortable with.