Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 657 Bytes

compiler-error-c2550.md

File metadata and controls

33 lines (27 loc) · 657 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2550
Compiler Error C2550
11/04/2016
C2550
C2550
3293f53e-ee66-4035-920d-34e115c3a24c

Compiler Error C2550

'identifier' : constructor initializer lists are only allowed on constructor definitions

A base class initializer list is used on the definition of a function that is not a constructor.

The following sample generates C2550:

// C2550.cpp
// compile with: /c
class C {
public:
   C();
};

class D : public C {
public:
   D();
   void func();
};

void D::func() : C() {}  // C2550
D::D() : C() {}   // OK