◐ Shell
clean mode source ↗

access specifiers - cppreference.com

Da cppreference.com.

Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.

La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui.

Click here for the English version of this page

<metanoindex/>

In un class o corpo struct definire la visibilità di dichiaratori seguenti

Original:

In a class or struct body define the visibility of following declarators

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

In una lista di eredità, definire la massima visibilità di membri ereditati

Original:

In a inheritance list, define the maximum visibility of inherited members

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sintassi

public: declarators (1)
protected: declarators (2)
private: declarators (3)
class identifier : public class_name (4)
class identifier : protected class_name (5)
class identifier : private class_name (6)

Spiegazione

# I simboli dichiarato dopo l'identificatore di avere accessibilità al pubblico

Original:

# The symbols declared after the specifier have public accessibility

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

# I simboli dichiarato dopo l'identificatore di aver protetto l'accessibilità

Original:

# The symbols declared after the specifier have protected accessibility

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

# I simboli dichiarato dopo l'identificatore di avere accessibilità privata

Original:

# The symbols declared after the specifier have private accessibility

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

# I membri ereditati hanno l'accessibilità stessa classe di base (sia protetto o pubblico come privato non sarà visibile nella classe derivata)

Original:

# The inherited members have the same accessibility as the base class ( either protected or public as private won't be visible in the derived class )

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

# I membri ereditati hanno protetto l'accessibilità nella classe derivata

Original:

# The inherited members have protected accessibility in the derived class

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

# I membri ereditati hanno accesso privato nella classe derivata

Original:

# The inherited members have private accessibility in the derived class

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Accessibilità membro da specificatore

, Pubblico

Original:

;public

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

membri pubblici sono accessibili ovunque, dentro e fuori il campo di applicazione della classe

Original:

public members are accessible everywhere, within and outside the class scope

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

; Protetto

Original:

;protected

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

membri protetti sono accessibili all'interno della classe e dei suoi metodi e nei suoi discendenti

Original:

protected members are accessible within the class and its methods and in its descendants

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

, Privato

Original:

;private

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

soci privati ​​possono essere accessibili solo all'interno della classe e dei suoi metodi

Original:

private members can be only accessed within the class and its methods

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Per concedere l'accesso a funzioni esterne o le categorie di membri protetti o privati, un amicizia dichiarazione deve essere presente nel corpo della classe

Original:

To grant access to external functions or classes to protected or private members, a amicizia dichiarazione must be present in the class body

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Ereditati membri privati ​​sono ancora presenti nei dati di classe, ma non è possibile accedervi direttamente

Original:

Inherited private members are still present in the class data but cannot be accessed directly

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Un class ha accesso privato predefinito per l'ereditarietà e soci, un struct ha invece una accessibilità al pubblico di default

Original:

A class has default private accessibility for inheritance and members, a struct has instead a default public accessibility

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.