Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 591 Bytes

compiler-error-c2570.md

File metadata and controls

23 lines (19 loc) · 591 Bytes
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: Compiler Error C2570
Compiler Error C2570
11/04/2016
C2570
C2570
d65d0b32-2fac-464a-bcdf-0ebcedf3bf32

Compiler Error C2570

'identifier' : union cannot have base classes

A union derives from a class, structure, or union. This is not allowed. Declare the derived type as a class or structure instead.

The following sample generates C2570:

// C2570.cpp// compile with: /cclassbase {}; union hasPubBase : public base {}; // C2570union hasNoBase {}; // OK
close