I have seen code which use vector,
vectors; s.push_back(11); s.push_back(22); s.push_back(33); s.push_back(55); for (vector::iterator i
auto keyword is intended to use in such situation, it is absolutely safe. But unfortunately it available only in C++0x so you will have portability issues with it.
auto