access specifiers
Aus 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. |
In einer class oder struct Körper definieren die Sichtbarkeit der folgenden Deklaratoren
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 einer Erbschaft Liste definieren die maximale Sichtbarkeit der geerbten Elemente
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.
[Bearbeiten] Syntax
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) | ||||||||
[Bearbeiten] Erklärung
# Die Symbole erklärt, nachdem die specifier öffentliche Zugänglichkeit haben
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.
# Die Symbole erklärt, nachdem die specifier Zugänglichkeit geschützt haben
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.
# Die Symbole erklärt, nachdem die specifier privaten Zugang haben
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.
# Die geerbten Member haben den gleichen Zugang wie das Basisklasse (entweder geschützt oder öffentlich werden nicht in der abgeleiteten Klasse sichtbar privat)
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.
# Die geerbten Mitglieder haben Zugang in der abgeleiteten Klasse geschützt
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.
# Die geerbten Member haben private Erreichbarkeit in der abgeleiteten Klasse
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.
[Bearbeiten] Mitglied Erreichbarkeit Spezifizierer
, Öffentliche
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.
- öffentliche Mitglieder zugänglich sind überall, innerhalb und außerhalb der Gültigkeitsbereich der KlasseOriginal: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.
; Geschützt
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.
- protected-Elemente sind innerhalb der Klasse und ihrer Methoden und ihrer NachkommenOriginal: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.
; Private
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.
- private Mitglieder kann nur innerhalb der Klasse und ihrer Methoden zugegriffen werdenOriginal: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.
Um den Zugriff auf externe Funktionen oder Klassen protected oder private Mitglieder zu gewähren, muss ein Freundschaft Erklärung vorhanden sein in der Klasse Körper
Original:
To grant access to external functions or classes to protected or private members, a Freundschaft Erklärung 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.
Vererbte private Mitglieder sind immer noch präsent in der Klasse Daten, kann aber nicht direkt zugegriffen werden
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 hat standardmäßig privat Zugänglichkeit für Erbschafts-und Mitglieder, hat eine struct stattdessen eine voreingestellte öffentliche Zugänglichkeit
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 |