Javatpoint Logo
Javatpoint Logo

C++ List max_size()

C++ List max_size() function determines the maximum size of the list. This function does not change the size of the list.

Syntax

Parameter

It does not contain any parameter.

Return value

It returns the maximum number of elements that the list can hold upto.

Example

Let's see a simple example

Output:

size of the list is: 768614336404564650

In this example, max_size() function returns the maximum size of the list that it can hold upto.


Next Topicfront() Function



Help Others, Please Share

facebook twitter pinterest