access specifiers
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
En un class o cuerpo struct definir la visibilidad de declaradores siguientes
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.
En una lista de la herencia, definir la máxima visibilidad de los miembros heredados
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.
[editar] Sintaxis
| 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) | ||||||||
[editar] Explicación
# Los símbolos declarados después del especificador tener acceso del público
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.
# Los símbolos declarados después de haber protegido el especificador de accesibilidad
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.
# Los símbolos declarados después del especificador tienen acceso privado
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.
# Los miembros heredados tienen la misma accesibilidad como la clase base (ya sea protegido o público como privado no será visible en la clase derivada)
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.
# Los miembros heredados han protegido a la accesibilidad en la clase derivada
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.
# Los miembros heredados tienen acceso privado en la clase derivada
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.
[editar] Miembro accesibilidad especificador
; Público
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.
- miembros públicos son accesibles en todas partes, dentro y fuera del ámbito de claseOriginal: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.
; Protegido
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.
- miembros protegidos son accesibles dentro de la clase y sus métodos y en sus descendientesOriginal: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.
; Privado
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.
- miembros privados sólo se puede acceder dentro de la clase y sus métodosOriginal: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.
Para permitir el acceso a las funciones externas o clases a miembros protegidos o privado, un amistad declaración debe estar presente en el cuerpo de la clase
Original:
To grant access to external functions or classes to protected or private members, a amistad declaración 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.
Heredado miembros privados aún están presentes en los datos de la clase, pero no se puede acceder directamente
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.
A class tiene acceso privado predeterminado para la herencia y los miembros, un struct tiene lugar un acceso público predeterminado
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 |