[ Web Proxy ]
URL:
Viewing: https://de.cppreference.com/cpp/language [Back]  [Original]

Die Sprache C++ cppreference.com
cppreference.com
Namensrume
Varianten

Die Sprache C++

Aus cppreference.com
< cpp


 
 
Sprache C++
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.
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 Ausfhrung 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 Erklrung
Lambda-Funktion Erklrung
Funktions-Template
inline-Spezifizierer
Exception-Spezifikationen (veraltet)
noexcept Spezifizierer (C++11)
Ausnahmen
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Namespaces
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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.
decltype specifier (C++11)
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
Lagerdauer Planer
constexpr Spezifizierer (C++11)
auto Spezifizierer (C++11)
alignas Spezifizierer (C++11)
Initialisierung
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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.
alternative Darstellungen
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.
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.
typedef declaration
Typ Aliasdeklaration (C++11)
Attribute (C++11)
Wirft
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
impliziten Konvertierungen
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
C-Stil und funktionale Besetzung
Speicherzuweisung
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Class-spezifische Funktion Eigenschaften
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
explizit (C++11)
statisch
Besondere Member-Funktionen
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Templates
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Klassen-Template
Funktions-Template
Template-Spezialisierung
Parameter Packs (C++11)
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
 

Dies ist eine kurze Referenz der verfgbaren C++-Sprachkonstrukte.

Allgemeine Themen

Prprozessor

Kommentare

Schlsselworte

ASCII-Tabelle

Escape-Sequenzen

Geschichte von C++

Flusskontrolle

Auswahlanweisungen

In Auswahlanweisungen werden, je nach Wert des zu prfenden Ausdrucks, verschiedene Code-Pfade durchlaufen.

  • if fhrt Code bedingt aus
  • switch fhrt Code entsprechend dem Wert eines ganzzahligen Ausdrucks aus

Iterationsanweisungen

Iterationsanweisungen fhren Code innerhalb eines Pfades mehrfach aus.

  • for fhrt Schleifen mithilfe der Angabe eines Indexes, einer Bedingung und einer Schrittweite aus
  • range-for fhrt Iterationen ber einen Bereich aus.(seit C++11)
  • while fhrt eine Schleife aus, bei der vor jeder Iteration eine Bedingung berprft wird
  • do-while fhrt eine Schleife aus, bei der eine Bedingung nach jeder Iteration berprft wird

Sprunganweisungen

Sprunganweisungen setzen die Programmausfhrung an einer anderen Stelle fort

  • continue berspringt den restlichen Code innerhalb des Codeblocks einer Schleife
  • break beendet die aktuelle Schleife
  • goto setzt die Ausfhrung an einem anderen Ort fort
  • return beendet die Ausfhrung der aktuellen Funktion

Funktionen

Derselbe Code kann an verschiedenen Stellen im Programm verwendet werden

Ausnahmen

Ausnahmen sind im Gegensatz zu Rckgabewerten oder globalen Fehlervariablen ein robuster Weg, um Fehler zu signalisieren.

Namensrume

Namensrume bieten eine Mglichkeit, um Namenskonflikte in groen Projekten zu verhindern.

Typen

  • Fundamentale Typen einfache Character-, Integer- und Fliekomma-Typen
  • Zeigertypen Typen, die auf eine Adresse im Speicher zeigen
  • Zusammengesetzte Typen Typen, die verschiedene Datenelemente beinhalten (im Wesentlichen das gleiche wie Klassen)
  • Aufzhlungstypen Typen, die in der Lage sind, nur eine der vorgegebenen Werte zu beinhalten
  • union-Typen Typen, die Daten in mehreren Darstellungen speichern knnen
  • Funktionstypen Funktionssignaturen, d.h. die Art der Argumente und den Rckgabe-Typ
  • decltype-Bezeichner legt fest, dass ein Typ dem Typ eines spezifischen Ausdrucks entspricht (seit C++11)

Bezeichner

  • cv gibt an, ob es sich um einen konstanten und/oder einen flchtigen Typen handelt
  • storage_duration gibt an, wie lang der Typ gespeichert wird
  • constexpr gibt an, dass der Wert einer Variable oder Funktion zur Kompilierzeit berechnet werden kann (seit C++11)
  • auto gibt an, dass der eigentliche Typ, der einer Variablen zugewiesen werden soll, auf einem Ausdruck basiert (seit C++11)
  • alignas gibt an, dass der Speicher fr die Variable auf eine bestimmte Menge festgelegt wird (seit C++11)

Initialisierung

Immer wenn eine benannte Variable deklariert ist, und wenn immer eine temporre Objekt erzeugt wird, der Startwert des neuen Aufgabe wird durch einen der folgenden Mechanismen bereitgestellt:
Original:
Whenever a named variable is declared, and whenever a temporary object is created, the initial value of the new object is provided through one of the following mechanisms:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Literale

Literale sind die Zeichen einer C++-Programm, das konstante Werte im Quellcode eingebettet stellen .
Original:
Literals are the tokens of a C++ program that represent constant values, embedded in the source code.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Expressions

Ein Ausdruck ist eine Folge von Operatoren und Operanden, die eine Berechnung angibt. Ein Ausdruck kann in einem Wert fhren und kann Nebenwirkungen verursachen .
Original:
An expression is a sequence of operators and operands that specifies a computation. An expression can result in a value and can cause side effects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Common operators
Zuweisungen incrementdecrement Arithmetik logisch Vergleich memberaccess andererseits

a = b a = rvalue a += b a -= b a *= b a /= b a %= b a &= b a |= b a ^= b a <<= b a >>= b

++a --a a++ a--

+a -a a + b a - b a * b a / b a % b ~a a & b a | b a ^ b a << b a >> b

!a a && b a || b

a == b a != b a < b a > b a <= b a >= b

a[b] *a &a a->b a.b a->*b a.*b

a(...) a, b (type) a ? :

Special operators
static_cast wandelt einem Typ in einen anderen kompatiblen Typ
Original:
static_cast converts one type to another compatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dynamic_cast wandelt virtuellen Basisklasse abgeleitet class
Original:
dynamic_cast converts virtual base class to derived class
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
const_cast wandelt Typ kompatiblen Typ mit unterschiedlichen cv qualifiers
Original:
const_cast converts type to compatible type with different cv qualifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
reinterpret_cast wandelt Typ inkompatibel type
Original:
reinterpret_cast converts type to incompatible type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
new ordnet memory
Original:
new allocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
delete freigibt memory
Original:
delete deallocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof fragt die Gre eines type
Original:
sizeof queries the size of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sizeof... fragt die Gre eines Parameter Pack (seit C++11)
Original:
sizeof... queries the size of a Parameter Pack (seit C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typeid fragt die Typinformationen eines type
Original:
typeid queries the type information of a type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
noexcept prft, ob ein Ausdruck eine Ausnahme (seit C++11)
werfen kann
Original:
noexcept checks if an expression can throw an exception (seit C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
alignof Abfragen Ausrichtungsanforderungen eines Typs (seit C++11)
Original:
alignof queries alignment requirements of a type (seit C++11)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Utilities

; 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.
; Casts
Original:
; Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
, Speicherbelegung
Original:
; Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Klassen

Klassen stellen das Konzept der objektorientierten Programmierung in C++.
Original:
Classes provide the concept of object-oriented programming in C++.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Class-spezifische Funktion Eigenschaften

Besondere Member-Funktionen

Templates

Ermglicht Funktionen und Klassen auf generische Typen zu betreiben
Original:
Allows functions and classes to operate on generic types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Optimierungen

Verschiedenes


Web Proxy Viewer  |  New URL  |  Original Page