SyntaxFix
Write A Post
Hire A Developer
Questions
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