Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ vector

#include <vector>
#include <iostream>

int main ()
{
    std::vector<int>    v1;        // LINE I
    v1.push_back(10);            // LINE II
    std::cout<<v1.front()<<":"<<v1.back()<<std::endl;        // LINE III
    return 0;
}

//code compiles successfully
Source by en.cppreference.com #
 
PREVIOUS NEXT
Tagged: #vector
ADD COMMENT
Topic
Name
4+9 =