c++ - Push String in Stack? -
i using c++ , want push strings in stack push int
in stacks.
for example
3."stackoverflow" 2."is" 1."best" 0."site"
at every index of stack want push string. how can this?
using stl, example:
#include <stack> std::stack<std::string> s; s.push("a"); s.push("b"); s.push("c"); s.push("d");
check stl reference more information.
Comments
Post a Comment