samedi 14 décembre 2019

How to solve this warning: extended initializer lists only available with -std=c++11 or -std=gnu++11

This is my code in c++ below :

#include <vector>

int main(int argc, char const *argv[]) {
    std::vector<int> numbers({1,2,3});
    return 0;
}

This is the warning I am getting :

warning: extended initializer lists only available with -std=c++11 or -std=gnu++11

My gcc version is 6.3.0 (MinGW.org GCC-6.3.0-1)

I am using windows 8.1 64 bit. Will updating my gcc solve it? If it does then how do I do that? Thanks in advance

Aucun commentaire:

Enregistrer un commentaire