C++ vector store int value

Description

C++ vector store int value

#include <iostream> 
#include <array> 
#include <vector> 
#include <ios> 


using namespace std; 

int main(int argc, char *argv [])
{   /*from w  w  w.  ja  va 2s  .c o m*/

    using MyVector = vector<int>; 
    
    MyVector myVector = { 0, 1, 2 }; 
    myVector.push_back(3); 
    myVector.push_back(4); 
        return 0; 
}



PreviousNext

Related