?? test.cpp
字號:
#include <iostream>
#include "DList.h"
#include "Queue.h"
#include "Stack.h"
#include "BTree.h"
using namespace std;
using namespace SSDataS;
int main()
{
int i = 0;
int temp = 0;
//SSDataS::DList<int> list;
//SSDataS::Queue<int> queue;
//SSDataS::Stack<int> stack;
SSDataS::BTree<int> tree;
for(i = 0; i < 10 ; i++)
{
//list.insert(i);
//list.insertAtHead(i + 1);
//list.insertAtTail(i + 2);
//queue.In(i);
//stack.Push(i);
tree.insert(i);
}
if(tree.isEmpty())
cout<<"empty"<<endl;
cout<<"left Travel:"<<endl;
tree.leftTravel();
cout<<"mid Travel:"<<endl;
tree.midTravel();
cout<<"right Travel:"<<endl;
tree.rightTravel();
tree.releaseAll();
/*cout<<"list's length:"<<list.getLength()<<endl;
list.moveToHead();
cout<<"head data:"<<list.getPresentData()<<endl;
while(!list.isEmpty())
{
list.removeFromHead(temp);
cout<<"now data:"<<temp<<endl;
}
cout<<"stack's length:"<<stack.getSLength()<<endl;
while(stack.getSLength() != 0)
{
stack.Pop(temp);
cout<<"now data:"<<temp<<endl;
}
cout<<"Queue's length:"<<queue.getQLength()<<endl;
cout<<"first data:"<<queue.getFirstItem()<<endl;
cout<<"last data:"<<queue.getLastItem()<<endl;
while(queue.getQLength() != 0)
{
queue.Out(temp);
cout<<"now data:"<<temp<<endl;
}
cout<<"length is:"<<list.getLength()<<endl;
list.removeAll();
cout<<"length is:"<<list.getLength()<<endl;
*/
cin.get();
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -