# std::stack<T,Container>::size

From cppreference.com
< cpp‎ | container‎ | stack

size_type size() const; |  |

Returns the number of elements in the underlying container, that is, c.size().

### Parameters

(none)

### Return value

The number of elements in the container.

### Complexity

Constant.

### See also

empty | checks whether the underlying container is empty (public member function)

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/container/stack/size&oldid=50673"