list-max_size

////////////////////////////////////////
//      2018/04/26 8:23:11
//      list-max_size

// returns the maximum number of elements the list can hold
#include <iostream>
#include <list>

using namespace std;

int main(){
    list<int> li(10);

    cout << "size of li = " << li.size() << endl;
    cout << "max_size = " << li.max_size() << endl;

    return 0;
}


/*
OUTPUT:
    size of li = 10
    max_size = 357913941
*/
posted @ 2018-04-26 09:09  老耗子  阅读(63)  评论(0编辑  收藏  举报