Unable to initialize vector

Hi,
I am using visual code studio on macbook pro, And in this c++ compiler is of version 3. because of which i am unable to initialise vector like this: vector vect{ 10, 20, 30 };

I tried changing it using steps on google, stack overfllow but cant.
What i should do??

Please help. I am BLOCKED because of this issue.

@simmy_gupta0404 this might be of some help (this is for the older version of c++) if you wish to use c++ 11 while compiling, I believe you are required to use the flag during compilation time, please look into the command line command required for that.

// the iterator constructor can also be used to construct from arrays:
  int myints[] = {16,2,77,29};
  std::vector<int> fifth (myints, myints + sizeof(myints) / sizeof(int) );

  std::cout << "The contents of fifth are:";
  for (std::vector<int>::iterator it = fifth.begin(); it != fifth.end(); ++it)
    std::cout << ' ' << *it;
  std::cout << '\n';

But i want to change the version of c++

@simmy_gupta0404 then you need to use the c++-11 flag during compilation

@simmy_gupta0404 https://stackoverflow.com/questions/10363646/compiling-c11-with-g

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.