/*_############################################################################
_##
_## 測試隊列的執行個體
_## Author: xwlee
_## Time: 2006.12.31
_## Chang'an University
_## Development condition: win2003 Server+VC6.0
_##
_## temp.cpp 檔案
_##########################################################################*/
#include<iostream>
#include <ctime>
#include <iomanip>
#include "stack.h"
using namespace std;
#define TEMP_SIZE 10
int main()
{
QUEUE_TYPE temp=100;
// int i;
myinsert( 40 );
myinsert( 50 );
myinsert( 60 );
myinsert( 70 );
myinsert( 80 );
cout << "is_full()=" << is_full() << endl;
cout << "first()=" << first() << endl;
mydelete();
cout << "first()=" << first() << endl;
mydelete();
cout << "first()=" << first() << endl;
mydelete();
cout << "first()=" << first() << endl;
mydelete();
cout << "first()=" << first() << endl;
mydelete();
cout<< "=======================================================" << endl;
myinsert( 140 );
myinsert( 150 );
myinsert( 160 );
myinsert( 170 );
myinsert( 180 );
cout << "first()=" << first() << endl;
mydelete();
cout << "first()=" << first() << endl;
mydelete();
cout << "first()=" << first() << endl;
mydelete();
cout << "first()=" << first() << endl;
mydelete();
cout << "first()=" << first() << endl;
mydelete();
cout << "is_empty()=" << is_empty() << endl;
cout << "is_full()=" << is_full() << endl;
/* srand( (unsigned)time( NULL ) ); // srand()函數產生一個以目前時間開始的隨機種子.
for(i=0; i < TEMP_SIZE; i++)
myinsert( 1+i );
for(i=0; i < TEMP_SIZE; i++)
{
cout << setw(5) << first();
mydelete();
if( (i+1) % 10 == 0 )
cout << endl;
}
*/
cout<< "=======================================================" << endl;
cout << "is_empty()=" << is_empty() << endl;
cout << "is_full()=" << is_full() << endl;
return 0;
}