Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 717 Bytes

compiler-error-c3213.md

File metadata and controls

39 lines (32 loc) · 717 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3213
Compiler Error C3213
11/04/2016
C3213
C3213
1f079e36-b3e9-40f8-8e95-08eeba3adc82

Compiler Error C3213

base class 'base_type' is less accessible than 'derived_type'

A type that will be visible from an assembly must use publicly visible base classes.

The following sample generates C3213:

// C3213.cpp
// compile with: /clr
private ref struct privateG {
public:
   int i;
};

public ref struct publicG {
public:
   int i;
};

public ref struct V : public privateG {   // C3213
public:
   int j;
};

public ref struct W: public publicG {   // OK
public:
   int j;
};