I have some questions about the
auto keyword.
1) I have seen declarations like this:
auto int i = 0;
What does the auto do?
2) I have also seen this:
v is a vector
for (auto i = v.begin(); i != v.end(); ++v)
// do something here...
where the auto keyword detects that
v is a vector and initializes
i accordingly (or something like that though I think that might be C++0x). Can you do this with C++98?
3) If, like in the last example,
auto automatically detects the type of
v, could I do something like this:
int integer = 23145496;
auto automajigger = integer;
Thanks in advance.