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

📄 nohead_linstack.cpp

📁 不带头结点的链式堆栈类,1、 定义并实现不带头结点的链式堆栈类
💻 CPP
字号:
#include<iostream.h>
#include<stdlib.h>

const int MaxStackSize=100;
typedef int DataType;
#include"nohead_LinStack.h"

template <class T>
void Order(nohead_LinStack<T>&s)
{
	DataType test[]={1,3,5,7,9};
	int n=5;

	for(int i=0;i<n;i++)
		s.Push(test[i]);

	while(s.NotEmpty())
		cout<<s.Pop()<<" ";
}

void main(void)
{
	nohead_LinStack<int> s;
	Order(s);
	cout<<endl;
}


⌨️ 快捷键说明

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