5,322
edits
Line 295: | Line 295: | ||
// Peek | // Peek | ||
// Always make sure stack is not empty | |||
char top = my_stack.top('a'); | char top = my_stack.top('a'); | ||
// Pop | // Pop | ||
// Note: returns void | // Note: returns void | ||
// Always make sure stack is not empty | |||
my_stack.pop(); | my_stack.pop(); | ||
</syntaxhighlight> | </syntaxhighlight> |