C++ examples for STL:vector
Specializing STL vector, store int value in vector
#include <iostream> #include <array> #include <vector> #include <ios> using namespace std; int main(int argc, char *argv []) { /*from ww w. j a v a 2 s. c o m*/ using MyVector = vector<int>; MyVector myVector = { 0, 1, 2 }; myVector.push_back(3); myVector.push_back(4); return 0; }