new code::blocks download compiler issue

am learning c++ at home. using code::blocks IDE. downloaded recent update with GNC compiler. Compiler does not recognize vector <int> v = {....} statement. What is the issue? Need a different compiler? which one and how do I get it and use with code::blocks?

Thanks!
The first thing to look at is the project settings. You need to insure that you're using one of the more recent C++ standards (C++11 or C++14 at a minimum, perhaps C++17) and you should have a few compiler warnings enabled (the more the better).


I’ve downloaded the latest code::blocks v. and set compiler flag for c++17. I still get error “vector” not defined within this scope. I’ve included iostream and cstdlib, do I need something else? Thanks
What about <vector>?
Did you use "vector" or "std:::vector"?

After you #include <vector>, the vector template class is within namespace std.
Topic archived. No new replies allowed.