                
     -,    
  -.   16.1   
,    TStackAsVector. 

     

       STACKED. CPP  DOS-  Easy Win-, 
          
  BIDSx.LIB (x   ); 

    bcc stacked bidss.lib 

    BIDS   Borland International Data Structure ( 
 Borland International).       , 
    : S (small -),  (compact  
),  (medium  ), L (large  ),  (huge  )  
Hflat   32-). 
        EasyWin-    
   <ALT+F10>   TargetExpert,  Target Type 
 EasyWin   Large  Small Target Model (   
 ,   Windows-    Large). 
,    Class Library  Standard Libraries.  
      . 

     16.1.   STACKED.CPP ( TStackAsVector) 

    1:	#include <iostream.h> 
    2:	#include <classlib\stacks.h> 
    3: 
    4:	#define TRUE 1 
    5:	#define FALSE 0                 
    6:	
    7:	//     
    8:	TStackAsVector<double> myStack(100);     
    I?!	. int nain()        
    11;	{                  
    12:	double d;      
    13:	int done = FALSE; 
    14: 
    15:	//        
    16:	while (Idone && !myStack.IsFull()) { 
    17:	  cout  "Enter double value (0.0 to quit): "; 
    18:	  cin  d;       //    
    19:	  if (d == 0.0) 
    20:	   done = TRUE;    //   while
    21:	else 
    22:	   myStack.Push(d); //  d   
    23:	} 
    24 
    25	//     
    26	int n = myStack.GetITemsInContainer();            
    27	cout  endl  "Number of objects: "  n  endl;   
    28	if (n > 0) 
    29	   cout  "Top of stack: "  myStack.Top()  endl  endl; 
    30 
    31	//        
    32	while (!myStack.IsEmpty()) 
    33	  cout  myStack.Pop()  endl; 
    34 
    35	return 0; 
    36	}

      STACKED       
   .    0,    
,   ,  ,    .  
      ,    
  .       
 "    ",     
 .  . 16.1    :	


    426      IV.   
