Namensräume
Varianten
Aktionen

cpp/string/byte/strerror: Unterschied zwischen den Versionen

Aus cppreference.com
< cpp‎ | string‎ | byte
K (r2.7.3) (Bot: Ergänze: en, es, it, pt, ru)
K (Use {{lc}}. Update links. Various fixes.)
 
Zeile 11: Zeile 11:
  
 
===Parameter===
 
===Parameter===
{{param list begin}}
+
{{begin}}
{{param list item | errnum |{{tr| Integralwert Bezugnahme auf eine Fehler Code| integral value referring to a error code}}}}
+
{{| errnum |{{tr| Integralwert Bezugnahme auf eine Fehler Code| integral value referring to a error code}}}}
{{param list end}}
+
{{end}}
  
 
===Rückgabewert===
 
===Rückgabewert===
Zeile 22: Zeile 22:
  
 
===Siehe auch===
 
===Siehe auch===
{{dcl list begin}}
+
{{begin}}
{{dcl list template | cpp/error/dcl list errno_macros}}
+
{{| cpp/error/errno_macros}}
{{dcl list see c | c/string/byte/strerror}}
+
{{see c | c/string/byte/strerror}}
{{dcl list end}}
+
{{end}}
  
 
[[en:cpp/string/byte/strerror]]
 
[[en:cpp/string/byte/strerror]]

Aktuelle Version vom 1. Juli 2013, 20:49 Uhr

 
 
Strings Bibliothek
Null-terminierte Strings
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Byte-Strings
Multibyte-Strings
Wide Strings
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.
basic_string
char_traits
 
Null-terminierte Byte-Strings
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.
Character Manipulation
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Umwandlungen in numerische Formate
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
String-Manipulation
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
strcpy
strncpy
strcat
strncat
strxfrm
String Prüfung
Original:
String examination
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Speicher Manipulation
Original:
Memory manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
memchr
memcmp
memset
memcpy
memmove
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.
strerror
 
definiert in Header <cstring>
char* strerror( int errnum );
Versandkosten Textversion der Fehlercode errnum. errnum ist in der Regel von der errno variable erworben, aber die Funktion akzeptiert einen Wert vom Typ int. Die Botschaft ist locale-spezifischen .
Original:
Returns text version of the error code errnum. errnum is usually acquired from the errno variable, however the function accepts any value of type int. The message is locale-specific.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das zurückgegebene Byte-String darf nicht verändert werden durch das Programm, kann aber überschrieben werden durch einen nachfolgenden Aufruf der strerror Funktion .
Original:
The returned byte string must not be modified by the program, but may be overwritten by a subsequent call to the strerror function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Parameter

errnum -
Integralwert Bezugnahme auf eine Fehler Code
Original:
integral value referring to a error code
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Rückgabewert

Zeiger auf einen null-terminierte Byte-String entsprechend dem Fehlercode errnum .
Original:
Pointer to a null-terminated byte string corresponding to the error code errnum.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Beispiel

[edit]
#include <iostream>
#include <cmath>
#include <cerrno>
#include <cstring>
 
int main()
{
    double not_a_number = std::log(-1.0);
    if (errno == EDOM) {
        std::cout << "log(-1) failed: " << std::strerror(errno) << '\n';
    }
}

Output:

log(-1) failed: Numerical argument out of domain

[Bearbeiten] Siehe auch

Makros für Standard-POSIX-kompatiblen Fehlerbedingungen
Original:
macros for standard POSIX-compatible error conditions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant) [edit]
C documentation for strerror