Namespace
Varianti

std::perror

Da cppreference.com.
< cpp‎ | io‎ | c

 
 
Ingresso / libreria di output
I / O manipolatori
C-style I / O
Buffer
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(deprecato)
Streams
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Astrazioni
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
File I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
String I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Array I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(deprecato)
ostrstream(deprecato)
strstream(deprecato)
Tipi
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Errore categoria interfaccia
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
C-style I / O
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Accesso ai file
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Diretta input / output
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fread
fwrite
Ingresso formattato / uscita
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formattato di input / output
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
File di posizionamento
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ftell
fgetpos
fseek
fsetpos
rewind
La gestione degli errori
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clearerr
feof
ferror
perror
Le operazioni sui file
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remove
rename
tmpfile
tmpnam
 
Elemento definito nell'header <cstdio>
void perror( const char *s );
Stampe a stderr il contenuto della stringa con terminazione null di caratteri puntata da s (a meno che s è un puntatore nullo), seguito dai due caratteri ": ", seguiti dalla realizzazione messaggio di errore definito descrive il codice di errore attualmente memorizzato nella variabile di sistema errno (identica all'uscita di std::strerror(errno)), seguita da '\n'.
Original:
Prints to stderr the contents of the null-terminated character string pointed to by s (unless s is a null pointer), followed by the two characters ": ", followed by the implementation-defined error message describing the error code currently stored in the system variable errno (identical to the output of std::strerror(errno)), followed by '\n'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica] Parametri

s -
puntatore ad una stringa con terminazione null con il messaggio esplicativo
Original:
pointer to a null-terminated string with explanatory message
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Valore di ritorno

(Nessuno)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Esempio

#include <cmath>
#include <cerrno>
#include <cstdio>
 
int main()
{
    double not_a_number = std::log(-1.0);
    if (errno == EDOM) {
        std::perror("log(-1) failed");
    }
}

Output:

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

[modifica] Vedi anche

macro che si espande a POSIX thread locale variable
(variabili macro) Numero di errore
Original:
macro which expands to POSIX-compatible thread-local error number variable
(variabili macro)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[modifica]
restituisce una versione di testo di un codice di errore visualizzato
Original:
returns a text version of a given error code
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione) [modifica]
C documentation for perror