Aracılığıyla paylaş


Derleyici Hatası C2271

'operator' : new/delete resmi liste değiştiricileri olamaz

Açıklamalar

işleci (new veya delete) bir bellek modeli tanımlayıcısı ile bildirilir.

Example

Aşağıdaki örnek C2271 oluşturur:

// C2271.cpp
// compile with: /c
void* operator new(size_t) const {   // C2271
// try the following line instead
// void* operator new(size_t) {
   return 0;
}

struct X {
   static void* operator new(size_t) const;   // C2271
   // try the following line instead
   // void * X::operator new(size_t) const;   // static member operator new
};