code required stack - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

code required stack

anish444anish444 Posts: 18Member
hey guys cn anyone tell me how to write a c++ program to store 2 stacks in a single array & then perform operations like push and pop on it??

Comments

  • bilderbikkelbilderbikkel Posts: 754Member
    : hey guys cn anyone tell me how to write a c++ program to store 2 stacks in a single array & then perform operations like push and pop on it??
    :
    A wild guess:
    [code]
    std::stack myStacks[2];
    myStacks[0].push(10);
    myStacks[1].push(10);
    [/code]


    bilderbikkel

Sign In or Register to comment.