c++ - How to push_back multiple values into a vector? -


i know question has been asked before, , know in c++11 can do

vector<int> v = {2,5,8,11,14}; vector<int> v{2,5,8,11,14}; 

and

v.push_back({x,y}); 

but gives me compile error. i'm using visual studio express 2012.

how accomplish this?

edit: error screenshot attached:

enter image description here

visual studio 2012 does not support vector initialization via initializer lists. there lot of c++11 support missing standard library included vs2012 supported vs2012 c++ compiler itself.

sadly, case vs2012 , case gcc 4.7, awesome compiler support new c++11 features hampered partial library support seems lag behind compiler.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -