6.3.   _________________________________161

       (memberwise
initialization).          -
  ,  .      -
   ,    ,    
  .    ,   ,
   ,    .    
 ,    ,   .  
    .

  ch_stac4.cpp

//   ch_stack  

ch_stack::ch_stack(const ch_stack& str) :

inax_len(str.max_len), top(str.top)
{

s = new char[sfcr.max_len] ;

assert(s i = 0) ;

memcpy(s, str.s, max_len);

}

 memcpy ()  stdlib.h  max_len     -
 str.s  ,     s.   
 (deep copy).      , -
       .    
   

s = str.s;

      (shallow copy);   
ch_s tack    .'    
    .

6.3.   

   -,      
  .          ,  -
   .   ,   delete
      ,    
    .

     ch_stack .

  ch_stac4.h

//ch_stack    

class ch_stack {
public:

ch_stack(); //  

'         ,   -
     ( ).  . .