auto

suggest change

Remarks

The keyword auto is a typename that represents an automatically-deduced type.

It was already a reserved keyword in C++98, inherited from C. In old versions of C++, it could be used to explicitly state that a variable has automatic storage duration:

int main()
{
  auto int i = 5; // removing auto has no effect
}

That old meaning is now removed.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents