Is the following code guaranteed by the standard to work(assuming st is not empty)?
#include
#include
int main()
{
extern std::st
Edit: initial statement redacted, the standard actually does provide a full definition for the stack adaptor, nothing left to implentors. see top answer.
You want a container that has a push and pop method and allows you to inspect elements anywhere in the container and uses a std::vector for storage. There is such a container in the standard template library
it is called std::vector.
Use std::stack only for bondage purposes