Regarding auto keyword

  • Thread starter Thread starter Jeff0803
  • Start date Start date
J

Jeff0803

Guest
We can use auto keyword in the iterator of the container or definition that includes an initializer like following.

for (auto p=v.begin(); p!=v.end(); ++p)

auto x = 123;
auto s = "San Francisco"

Then is the auto type safe? or not?

Continue reading...
 
Back
Top