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

📄 cstack.cpp

📁 数据结构c++语言描述 Borland C++实现
💻 CPP
字号:


// test formula-based stack class
// with array expansion and reduction

#include <iostream.h>
#include "cstack.h"

void main(void)
{
   try {
      Stack<int> S;
      S.Add(6).Add(5).Add(4).Add(3);
      S.Add(2).Add(1).Add(0);
      cout << "Stack is " << endl
           << S << endl;
      int z;
      for (int i = 1; i < 6; i++) {
         S.Delete(z);
         cout << "Deleted element is " << z << endl;}
      }
   catch (...) {
      cerr << "An exception has occurred" << endl;
      }
}

⌨️ 快捷键说明

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