Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 864 Bytes

compiler-error-c2504.md

File metadata and controls

42 lines (35 loc) · 864 Bytes
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Compiler Error C2504 | Microsoft Docs
11/04/2016
cpp-tools
error-reference
C2504
C++
C2504
c9e002a6-a4ee-4ba7-970e-edf4adb83692
9
corob-msft
corob
ghogen

Compiler Error C2504

'class' : base class undefined

The base class is declared but never defined. Possible causes:

  1. Missing include file.

  2. External base class not declared with extern.

The following sample generates C2504:

// C2504.cpp  
// compile with: /c  
class A;  
class B : public A {};   // C2504  

// OK

class C{};  
class D : public C {};