
Examining how Many Elements a Container is Currently Holding
You can detect how many elements are currently stored in a container by calling the member function size(): vector vi; //create a vector of int’sfor (int i = o; i < 10; i++) //fill vector{ vi.push_back(i);}cout