I am running the below program on Dev-C++, and I am not able to execute it, as it always give me error while compiling the program.
#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int> v2{2,3,4,5};
for(int x : v2)
{
cout<<x<<" ";
}
return 0;
}
[Warning] extended initializer lists only available with -std=c++11 or -std=gnu++11
It always give me error, I just wanted to confirm, whether this type of Vector Initialisation is right? Or I am doing it the wrong way? I am new to the community, sorry If this has been answered previously also, you could redirect me to the previous answer also.