#include<iostream>
#include<stdio.h>
#include<stdlib.h>
using namespace std;
template <class T>
struct Node
{
T data;
Node<T> *next;
};
template<class T>
class LinkStack
{
public:
LinkStack(){top=NULL;}
~LinkStack();
void Push(T x);
T Pop();
T GetTop(){if(top!=NULL)return top->data;}
int Empty(){
if(top==NULL)
return 1;
else
return 0;
}
private:
Node<T> *top;
};
template<class T>
void LinkStack<T>::Push(T
C++后缀表达式求值源码
最新推荐文章于 2025-07-20 16:53:44 发布
