#include<iostream> #include"linkstack.h" using namespace std; int main() { linkstack<int> L; if (L.empty()) { cout << "这是空栈!" << endl; } else cout << "这不是空栈!" << endl; cout << "对元素10和31进行入栈操作。" << endl; L.push(10); L.push(31); cout << "入栈后栈顶元素为:" << L.GetTop() << endl; cout << "进行一次出栈:" << endl; L.pop(); cout << "进行一次出栈后栈顶元素为:" << L.GetTop() << endl; system("pause"); return 0; }