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

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -