1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
// deque::size
#include <iostream>
#include <deque>
int main ()
{
std::deque<int> myints;
std::cout << "0. size: " << myints.size() << '\n';
for (int i=0; i<5; i++) myints.push_back(i);
std::cout << "1. size: " << myints.size() << '\n';
myints.insert (myints.begin(),5,100);
std::cout << "2. size: " << myints.size() << '\n';
myints.pop_back();
std::cout << "3. size: " << myints.size() << '\n';
return 0;
}
| |