⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stack.h

📁 不带括号算术式求值另外一个版本 可以自动判断优先级 排除空格等字符影响
💻 H
字号:
#ifndef STACK_H
#define STACK_H

//abstract Stack class
template <class Elem> class Stack {
public:
  // Reinitialize the stack
  virtual void clear() = 0;
  // Push an element onto the top of the stack.
  virtual bool push(const Elem&) = 0;
  // Remove the element at the top of the stack. 
  virtual bool pop() = 0;
  // Get a copy of the top element in the stack
  virtual bool topValue(Elem&) const = 0;
  // Return the number of elements in the stack.
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -