[ create a new paste ] login | about

Link: http://codepad.org/sbMPppgx    [ raw code | output | fork ]

C++, pasted on Apr 22:
1
2
3
4
5
6
7
8
9
int main()
{
   std::cout << "Max elements that can be inserted into a vector having elements of size '" << sizeof( std::vector<int> )
             << "' is: " << std::vector<std::vector<int> >().max_size() << std::endl;

   std::vector<std::vector<int> > myvec(100000);

   std::cout << myvec.size();
}


Output:
1
2
Max elements that can be inserted into a vector having elements of size '28' is: 153391689
100000


Create a new paste based on this one


Comments: