Delen via


Compilerfout C2253

'functie': zuivere aanduiding of abstracte overschrijvingsaanduiding alleen toegestaan voor virtuele functie

Opmerkingen

Een niet-virtuele functie wordt opgegeven als puur virtual.

Voorbeelden

In het volgende voorbeeld wordt C2253 gegenereerd:

// C2253.cpp
// compile with: /c
class A {
public:
   void func1() = 0;   // C2253 not virtual
   virtual void func2() = 0;   // OK
};

In het volgende voorbeeld wordt C2253 gegenereerd:

// C2253_2.cpp
// compile with: /clr /c
ref struct A {
   property int Prop_3 {
      int get() abstract;   // C2253
      // try the following line instead
      // virtual int get() abstract;

      void set(int i) abstract;   // C2253
      // try the following line instead
      // virtual void set(int i) abstract;
   }
};