編譯器錯誤 C2650
'operator' : 不可以是虛擬函式
new
或 delete
運算子宣告為 virtual
。 這些運算子是 static
成員函式,不能是 virtual
。
範例
下列範例會產生 C2650:
// C2650.cpp
// compile with: /c
class A {
virtual void* operator new( unsigned int ); // C2650
// try the following line instead
// void* operator new( unsigned int );
};