Скачиваний:
18
Добавлен:
15.06.2014
Размер:
1.61 Кб
Скачать
яю<>6=> ?5@53@C78BL ;>:0;L=> 8 3;>10;L=>

void *operator new(size_t tip,int kol)       //3;>10;L=0O D-F8O operator new 

{ cout << "3;>10;L=0O DC=:F8O 1" <<endl; 

   return new char[tip*kol]; 

}  return p;

} 

class cls 

{  char a[40]; 

 public: 

   cls(char *aa){ strcpy(a,aa); } 

   ~cls(){} 

   void *operator new(size_t,int); 

}; 

void *cls::operator new(size_t tp,int n)         // ;>:0;L=0O DC=:F8O operator 

{ cout << ";>:0;L=0O  DC=:F8O " <<endl; 

  return new char[tp*n]; } 

void main() 

{ cls obj("?5@53@C7:0 >?5@0B>@0   new"); 

  float *ptr1; 

  ptr1=new (5) float;                // 2K7>2 3;>10;L=>9 DC=:F88 operator new  

  cls *ptr2=new (3) cls("aa");  // 2K7>2 ;>:0;L=>9 DC=:F88 operator new 

}                                               // 8A?>;L7CO cls::cls("aa")