/*#include "Tdate.h"
#include "Square.h"
#include <stdlib.h>
#include <windows.h>
using namespace std;
int main()
{
Tate<int> a1;
al.set(2023,3,8);
al.println();
Sleep(3000);
Square<int>a2;
cout<<a2.fun(10)<<endl;
system("PAUSE");
return 0;
}*/
//---------------------------------------------------------
/*#include <iostream>
#include"seqlist.h"
using namespace std;
int main ()
{
try{
int a[6]= {4,8,9,7,2,6};
seqlist<int> L(a,6) ;
cout << "当前线性表数据为:" << endl;
L.PrintList();
cout << endl;
cout << "在位置4处插入6:"<< endl;
L.Insert(4,6);
L.PrintList();
cout << endl;
cout << "查找4在线性表中位置:" << L.Locate(4) << endl;
cout << endl;
cout << "查找位置5处的值:" << L.Get(5)<< endl;
cout << endl;
cout << "删除位置3处的值:" << endl;
L.Delete(3);
cout << endl;
cout << "删除后的数据为:";
L.PrintList();
cout << endl;
cout <<"当前线性表长度:" <<L.Length()<<endl;
cout << endl;
cout <<"线性表是否为空:" <<L.Empty() <<endl;
cout << endl;
}catch (char * str) {cout << str << endl ;}
}*/
//--------------------------------------------------------------
/*#include <iostream>
#include"LinkList.h"
using namespace std;
int main ()
{
try{
int a[6]= {6,9,7,8,2,5};
LinkList<int> L(a,6);
cout << "当前链表数据为:" << endl;
L.PrintList();
cout << endl;
cout << "在位置5处插入1:"<< endl;
L.Insert(5,1);
L.PrintList();
cout<<endl;
cout << "查找2在表中位置:" << L.Locate(2) << endl;
cout<<endl;
cout << "查找位置2处的值:" << L.Get(2)<< endl;
cout<<endl;
cout << "删除位置1处的值:" << endl;
L.Delete(3);
cout<<endl;
cout << "删除后的数据为:";
L.PrintList();
cout<<endl;
cout <<"当前线性表长度:" <<L.Length()<<endl;
cout<<endl;
}catch (char * str) {cout << str << endl ;}
}
*/
//---------------------------------------------------------------------------------
#include<iostream>
using namespace std;
#include "SeqStack.h"
//#include"LinkStack.h"
int main()
{
SeqStack<int> S;
//LinkStack<int> S;
try
{
cout<<"15 and 10,25 perform the push operation:"<<endl;
S.Push(15);
S.Push(10);
S.Push(25);
cout<<"The header element is:"<<endl;
cout<<S.GetTop()<<endl;
cout<<"Perform a Pop operation"<<endl;
S.Pop();
cout<<"The header element is:"<<endl;
cout<<S.GetTop()<<endl;
if(S.Empty()==1)
cout<<"The stack is empty"<<endl;
else
cout<<"The stack is not empty"<<endl;
}
catch(string s)
{
cout<<s<<endl;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
hushubo.zip
共12个文件
h:6个
o:1个
layout:1个
需积分: 0 0 下载量 98 浏览量
2024-04-28
21:24:20
上传
评论
收藏 433KB ZIP 举报
温馨提示
hushubo.zip
资源推荐
资源详情
资源评论
收起资源包目录
hushubo.zip (12个子文件)
hushubo3
hushubo.depend 1KB
obj
Debug
main.o 56KB
seqlist.h 2KB
hushubo.layout 1KB
main.cpp 3KB
hushubo.cbp 1KB
bin
Debug
hushubo.exe 1.54MB
seqstack.h 1KB
Tdate.h 394B
linkstack.h 1KB
linklist.h 3KB
square.h 264B
共 12 条
- 1
资源评论
一只小甜心儿
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功