vector<int> arr3 = {3, 6, 9, 12, 15};
I'm trying to initialise the vector by above method and it is throwing the following error:
vectors.cpp:102:16: error: non-aggregate type 'vector<int>' cannot be initialized with an initializer list
vector<int>arr3 = {3, 6, 9, 12, 15};
^ ~~~~~
1 error generated.
C++ version is 14.0.3
I've also tried to run command: clang++ -std=c++ <filename> and command equivalent to this but this is not working.
Initialisation if vector