次の方法で共有


コンパイラ エラー 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 );
};