access specifiers
Da 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. |
Num corpo class struct ou definir a visibilidade de declarators seguintes
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.
Em uma lista de herança, definir a visibilidade máxima de membros herdados
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] Sintaxe
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] Explicação
# Os símbolos declarados após o especificador de ter acessibilidade pública
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.
# Os símbolos declarados após o especificador de ter protegido a acessibilidade
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.
# Os símbolos declarados após o especificador tem acessibilidade particular
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.
# Os membros herdados têm a mesma acessibilidade como a classe base (ou protegido ou público como privado não será visível na classe 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.
# Os membros herdados ter protegido acessibilidade na classe 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.
# Os membros herdados têm acessibilidade particular na classe 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] Acessibilidade membro pelo 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.
- membros públicos são acessíveis em todos os lugares, dentro e fora do escopo da 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.
; 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.
- membros protected são acessíveis dentro da classe e seus métodos e em seus descendentesOriginal: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.
- membros privados só pode ser acessada dentro da classe e seus 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 conceder acesso a funções externas ou classes aos membros protegidos ou privado, um declaração de amizade devem estar presentes no corpo da classe
Original:
To grant access to external functions or classes to protected or private members, a declaração de amizade 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.
Herdados membros privados ainda estão presentes nos dados de classe, mas não pode ser acessada diretamente
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 tem acessibilidade particular padrão para herança e membros, uma vez struct tem uma acessibilidade ao público padrão
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.
Esta seção está incompleta Motivo: example |