First, this question is compiler-related rather than Code::Blocks related, so it would be appropriate to ask this question at a forum for general C++ programming help rather than here.
Second, the exact code you posted will raise a compiler error at the first declaration of vector rather than the second, because vector hasn't been qualified with the std namespace.
So make sure that the code you post at whichever general programming help forum you choose actually does exhibit whatever error you're getting.
Cheers,
JohnE / TDM
P.S. -- Even if the question were C::B-related, you'd only be told to download a nightly build. Code::Blocks has come a long way since RC2.