When trying to create a simple vector in C++, I get the following error :
Non-aggregates cannot be initialized with initializer list.
The code I'm using is:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[])
{
vector <int> theVector = {1, 2, 3, 4, 5};
cout << theVector[0];
}
I tried to put:
CONFIG += c++11
into my .pro
file, saved and rebuilt it. However, I still get the same error. I'm using what I assume to be Qt 5.5, here's what happens when I press About
if it means anything to you: Qt's About.
Any help is appreciated.