a2_2.cpp

来自「一些C++的课件和实验源代码」· C++ 代码 · 共 27 行

CPP
27
字号
// A2_2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "stack.h"
#include <iostream.h>
#include <conio.h>

int main(int argc, char* argv[])
{
	stack s(10);

	try{
		s.pop();
		for(int i = 0; i < 20; i++){
			s.push(i);
		}
		s.print();
	}
	catch(stackexpt e){
		cout << "exception: " << e.get_content() << endl;
	}

	getch();
	return 0;
}

⌨️ 快捷键说明

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