Compartir a través de


Error del compilador C3213

La clase base 'base_type' es menos accesible que 'derived_type'

Un tipo que será visible desde un ensamblado debe usar clases base visibles públicamente.

El ejemplo siguiente genera la advertencia 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;
};