Clever Geek Handbook
📜 ⬆️ ⬇️

strerror

The string function strerror is a C / C ++ language function that translates the error code, which is usually stored in the errno global variable , into an error message that people can understand.

Content

History

The strerror function is defined in IEEE Std 1003.1, also known as POSIX 1 .

Returnability

The strerror function is not cost-effective . There are two thread-safe strerror replacements: strerror_s in visual c ++ and strerror_r in the POSIX standard.

Usage

Connection

C
  #include <string.h> 
C ++
  #include <cstring> 

Announcement

  char * strerror ( int errnum );

Semantics

The function generates and displays a C -style string with an error message received from the error code passed to errnum .

See also

  • strerror_r
  • perror
  • ISO / ANSI C
  • ISO / ANSI C ++
  • Posix
  • Unified UNIX Specification

Links

  1. strerror on the OpenGroup website
  2. strerror on Codenet
Source - https://ru.wikipedia.org/w/index.php?title=Strerror&oldid=97507903


More articles:

  • HAR1F
  • Aksu (city, Pavlodar region)
  • Endorser
  • Adolph Gerhard
  • Spatula (Architecture)
  • Babanov, Ivan Dmitrievich
  • Japanese Grand Prix 1977
  • Farm, Pierre
  • Egorov, Alexey Mikhailovich (Hero of the Soviet Union)
  • Wrangel, Vasily Vasilievich

All articles

Clever Geek | 2019