#include<stdio.h> #include <string.h> #define SIZE 300 template <class type > class Stack...{ private : long top ; long capicity ; type arr[ SIZE ] ; public : Stack(); ~Stack(); void push( type a ) ; type pop () ; long is_empty(); type get_top() ; }; template <class type > Stack<type>::Stack() ...{ top =-1; capicity = SIZE ; } template <class type > Stack<type>::~Stack() ...{ } template <class type> type Stack<type> ::pop() ...{ if( top !=-1 ) return arr[ top -- ] ; } template <class type > void Stack<type>::push( type input ) ...{ if( top < SIZE ) arr[ ++ top ] = input ; } template <class type> long Stack<type> ::is_empty() ...{ return top ==-1 ; } template <class type > type Stack<type >::get_top() ...{ if( top !=-1 ) return arr[ top ] ; } char buffer[300] , ch , p ; long buffer_i =0 ; double num , a, b ; // ) =-1 , */ = -2 , +- =-3 ,( = -4 , # = -5 long get_char_num( char&ch ,double& num ) // double num ...{ int i =0 ; num =0; ch =NULL ; while( buffer[ buffer_i ] !='
#includestdio.h>#include string.h>#define SIZE 300 template class type >class Stack...{private : long top ; long capicity ; type arr[ SIZE ] ;public : Stack(); ~Stack(); void push( type a ) ; typ