std::vector in C++

#include <iostream>
#include <vector>
using namespace std;

int main()
{
    vector<int> v = {4, 5, 6};
    v.push_back(7);
    cout << v[0] << endl;
    cout << v[3] << endl;
    cout << "The vector size is : " << v.size() << endl;

    return 0;
}

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *