/*_############################################################################
_##
_## 一个使用泛型堆栈模块创建的两个容纳不同类型数据的实例
_## Author: xwlee
_## Time: 2007.01.02
_## Chang'an University
_## Development condition: win2003 Server+VC6.0
_##
_## temp.cpp 文件
_##########################################################################*/
#include<iostream>
#include <stdlib.h>
#include "stack.h"
using namespace std;
GENERIC_STACK( int, _int, 10 )
GENERIC_STACK( float, _float, 10 )
int main()
{
cout<< "/n=======================================================" << endl;
push_int( 5 );
push_int( 22 );
push_int( 15 );
push_float( 25.3 );
push_float( -40.5 );
while( !is_empty_int() )
{
cout << "Popping " << top_int() << endl;
pop_int();
}
while( !is_empty_float() )
{
cout << "Popping " << top_float() << endl;
pop_float();
}
return 0;
}
_##
_## 一个使用泛型堆栈模块创建的两个容纳不同类型数据的实例
_## Author: xwlee
_## Time: 2007.01.02
_## Chang'an University
_## Development condition: win2003 Server+VC6.0
_##
_## temp.cpp 文件
_##########################################################################*/
#include<iostream>
#include <stdlib.h>
#include "stack.h"
using namespace std;
GENERIC_STACK( int, _int, 10 )
GENERIC_STACK( float, _float, 10 )
int main()
{
cout<< "/n=======================================================" << endl;
push_int( 5 );
push_int( 22 );
push_int( 15 );
push_float( 25.3 );
push_float( -40.5 );
while( !is_empty_int() )
{
cout << "Popping " << top_int() << endl;
pop_int();
}
while( !is_empty_float() )
{
cout << "Popping " << top_float() << endl;
pop_float();
}
return 0;
}