[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/error/errno [Back]  [Original]

errno cppreference.com
cppreference.com

errno

cppreference.com
<tbody> </tbody>
#define errno /* - */

errno , . static ( C++11) ( C++11) int.

, errno. , errno , <cerrno> , E, .

errno 0, errno , , 0 errno.

#include <cerrno>
#include <clocale>
#include <cmath>
#include <cstring>
#include <iostream>

int main()
{
    const double not_a_number = std::log(-1.0);
    std::cout << not_a_number << '\n';
    
    if (errno == EDOM)
    {
        std::cout << " log(-1): " << std::strerror(errno) << '\n';
        std::setlocale(LC_MESSAGES, "de_DE.utf8");
        std::cout << ",  , " << std::strerror(errno) << '\n';
    }
}

:

nan
 log(-1): Numerical argument out of domain
,  , Das numerische Argument ist ausserhalb des Definitionsbereiches

C++:

LWG 310 C++98 , errno
errno

, POSIX
() []
, , stderr
() []

() []
C errno

Web Proxy Viewer  |  New URL  |  Original Page