access specifiers
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. |
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.
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.
You can help to correct and verify the translation. Click here for instructions.
[modifica]Sintassi
public:declarators | (1) | ||||||||
protected:declarators | (2) | ||||||||
private:declarators | (3) | ||||||||
classidentifier: publicclass_name | (4) | ||||||||
classidentifier: protectedclass_name | (5) | ||||||||
classidentifier: privateclass_name | (6) | ||||||||
[modifica]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.
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.
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.
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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
[modifica]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.
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 classeOriginal:public members are accessible everywhere, within and outside the class scopeThe 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.
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 discendentiOriginal:protected members are accessible within the class and its methods and in its descendantsThe 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.
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 metodiOriginal:private members can be only accessed within the class and its methodsThe 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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
This section is incomplete Reason: example |