1#include <vector>
2
3int main() {
4 std::vector<int> myVector = { 666, 1337, 420 };
5
6 size_t size = myVector.size(); // 3
7
8 myVector.push_back(399); // Add 399 to the end of the vector
9
10 size = myVector.size(); // 4
11}
1vector<int> a;
2//to directly find the size of the vector;
3//use a.size(;
4
5cout <<" " << a.size();