#include <bits/stdc++.h>
using namespace std;
int main()
{
vector<int> vect1(10);
int value = 5;
fill(vect1.begin(), vect1.end(), value);
for (int x : vect1)
cout << x << " ";
}
this does not compile in dev c++ and shows error.. i directly copied this code from gfg--> link is https://www.geeksforgeeks.org/initialize-a-vector-in-cpp-different-ways/.
EDIT : it says range based for loops are not allowed in cpp98 version
im new to cpp any help is appreciated!