        

       ,   ,  
TIArrayAsVector,   ,    TShouldDelete. 
,    ,    
 : 

    TIArrayAsVector<string> stuff(100); 

      ,   stuff   (    ), 
   OwnsElements(),    TShouldDelete:

    cout  stuff.OwnsElements()  endl;	

   OwnsElements()   (1),     , 
  (0),  . 
             
     OwnsElement(),    
.     TRUE  FALSE.  
  : 

    #define TRUE 1 
    #define FALSE 0	

    ...
    stuff.OwnsElements(FALSE);  //   	

         stuff ,    
  .      
  OwnsElementsO   TRUE: 

    stuff.OwnsElements(TRUE);	


     

            ,  
       TShouldDelete.     
  : 

    TArrayAsVector<strmg> stuff2(100); , 

           stuff2: 

    stuff2.OwnsElements(TRUE);	// !!!

             
" 'OwnsElements' is not a member of 'TArrayAsVector<string>' " ( 'OwnsElements'  
  'TArrayAsVector<string>' ),   ,  
 ,     TShouldDelete.     
    ,     . 


        

             
 -        
 , ,     .   16.4 
   . 

     16.4.  OWNER.CPP (  ) 

    1:	#include <iostream.h>               
    2:	#include <cstring.h>           
    3:	#include <classlib\arrays. h>                            
    4: 
    5:	//     
    6:	typedef TIArrayAsVector<string> TContainer; 
    7: 
    8.	typedef TIArrayAsVectorlterator<string> TIterator;	
    9:	//     	
    10:	void ShowMe(const char msg, TContainer &cr);
    11:		
    12:	int main()	
    13:	{ 
    14:	  TContainer *cp;   //    
    15:	  string s("Tulips"); //  	
    16: 
    17:	  //        
    18:	   = new TContainer(10, 0, 10);	
    19:	  cout  endl;                                  
    20:	  cout  "Array owns objects: ";	
    21:	  if (cp->OwnsElements()) 


    434	 IV.   
