Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22116

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

$
0
0

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


Viewing all articles
Browse latest Browse all 22116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>