Namensräume
Varianten
Aktionen

Storage-class specifiers

Aus cppreference.com
< c‎ | language

 
 
C-Sprache
Allgemeine Themen
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Preprocessor
Kommentare
Keywords
ASCII-Tabelle
Escape-Sequenzen
Geschichte der C
Flusskontrolle
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Bedingte Ausführung Aussagen
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterationsanweisungen
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Gehe Aussagen
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funktion Erklärung
inline-Spezifizierer
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Specifiers
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv Planer
Storage-Class-Planer
alignas Spezifizierer (C99)
Literale
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressions
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Reihenfolge der Auswertung
alternative Betreiber
Betreiber
Operatorvorrang
Utilities
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
Attribute (C99)
wirft
Verschiedenes
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Inline Montage
 
  • auto - automatischer ohne Bindung .
    Original:
    auto - automatic duration with no linkage.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • register - automatischer ohne Bindung. Auch Hinweise für den Compiler, um die Variable in der Prozessor-Register legen .
    Original:
    register - automatic duration with no linkage. Also hints to the compiler to place the variable in the processor's register.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • static - statische Dauer mit interner Bindung .
    Original:
    static - static duration with internal linkage.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • extern - statische Dauer mit internen oder häufiger externe Bindung .
    Original:
    extern - static duration with either internal or more usually external linkage.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • _Thread_local - (Seit C11) - Gewinde Lagerdauer .
    Original:
    _Thread_local - (Seit C11) - thread storage duration.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Erklärung

[Bearbeiten] Lagerdauer

Alle Variablen in einem Programm eine der folgenden Speicher-Dauer, die die Lebensdauer bestimmt:
Original:
All variables in a program have one of the following storage durations that determines its lifetime:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • ' 'Automatische Lagerdauer. Die Variable wird zu Beginn des einschließenden Codeblock reserviert und freigegeben am Ende. Dies ist die Standardeinstellung für alle Variablen, mit Ausnahme deklariert static, extern oder _Thread_local .
    Original:
    automatic storage duration. The variable is allocated at the beginning of the enclosing code block and deallocated at the end. This is the default for all variables, except those declared static, extern or _Thread_local.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ' 'Static Lagerdauer. Die Variable zugeordnet wird, wenn das Programm beginnt und freigegeben, wenn das Programm beendet. Nur eine Instanz des variablen existieren kann. Deklarierten Variablen mit static oder extern haben diese Lagerdauer .
    Original:
    static storage duration. The variable is allocated when the program begins and deallocated when the program ends. Only one instance of the variable can exist. Variables declared with static or extern have this storage duration.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ' 'Thread Lagerdauer (Seit C11). Die Variable zugeordnet wird, wenn der Faden beginnt und freigegeben, wenn der Thread beendet. Jeder Thread hat eine eigene Instanz der Variable. Nur Variablen deklariert _Thread_local haben diese Lagerdauer. _Thread_local kann nur für Variablen deklariert mit erklärt werden static oder extern und kann nicht in einer Funktion Deklaration verwendet werden .
    Original:
    thread storage duration (Seit C11). The variable is allocated when the thread begins and deallocated when the thread ends. Each thread has its own instance of the variable. Only variables declared _Thread_local have this storage duration. _Thread_local can only be declared for variables declared with static or extern and cannot be used in a function declaration.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ' 'Zugeordneten Lagerdauer. Die Variable wird reserviert und freigegeben pro Anforderung mithilfe dynamische Speicherverwaltung Funktionen .
    Original:
    allocated storage duration. The variable is allocated and deallocated per request by using dynamische Speicherverwaltung functions.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Linkage

Bindung bezieht sich auf die Fähigkeit einer Variable oder Funktion in anderen Bereichen bezeichnet. Wenn eine Variable oder Funktion mit dem gleichen Bezeichner in mehreren Bereichen deklariert wird, aber nicht, um aus allen von ihnen bezeichnet werden, werden dann mehrere Instanzen des variablen erzeugt. Die folgenden Verbindungen werden erkannt:
Original:
Linkage refers to the ability of a variable or function to be referred to in other scopes. If a variable or function with the same identifier is declared in several scopes, but cannot be referred to from all of them, then several instances of the variable are generated. The following linkages are recognized:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • ' 'Keine Verknüpfung. Die Variable kann nur vom Umfang bezeichnet ist es in. Alle Variablen mit automatischer, Faden und dynamischen Speichermodul Dauern haben diese Bindung .
    Original:
    no linkage. The variable can be referred to only from the scope it is in. All variables with automatic, thread and dynamic storage durations have this linkage.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ' 'Interne Bindung. Die Variable kann von allen Bereiche in der aktuellen Übersetzungseinheit bezeichnet werden. Alle Variablen, die static deklariert haben diese Verbindung .
    Original:
    internal linkage. The variable can be referred to from all scopes in the current translation unit. All variables which are declared static have this linkage.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • ' 'Externe Bindung. Die Variable kann von allen anderen Übersetzungseinheiten im gesamten Programm bezeichnet werden. Alle Variablen, die entweder extern oder const ohne explizite Storage-Klasse Spezifizierer deklariert sind, aber nicht static haben diese Verbindung .
    Original:
    external linkage. The variable can be referred to from any other translation units in the entire program. All variables which are declared either extern or const with no explicit storage-class specifier, but not static, have this linkage.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Keywords

auto, register, static, extern, _Thread_local

[Bearbeiten] Beispiel