M. Reddy
M. Reddy

Reputation: 47

Is there a way to set the stack size using C++ stack container?

I was wondering if there a way to set the stack size while using the C++ STL for the stack container?

Upvotes: 3

Views: 999

Answers (1)

user2100815
user2100815

Reputation:

No, there isn't. To do so you would need to set the maximum size for the underlying container used to implement the stack (for example, deque or list), as stack is an adaptor, not a container, and there is no way of doing that.

Upvotes: 4

Related Questions