3) 计算若以 errnum 调用则 strerror_s 本会写入的,本地环境限定错误消息的不截断长度。长度不包含空终止符。 同所有边界检查函数, strerror_s, strerrorlen_s 仅若实现定义了 __STDC_LIB_EXT1__ ,且用户在包含 string.h 前定义 __STDC_WANT_LIB_EXT1__ 为整数常量 1 才保证可用。
strerrorlen_s lets you get the length of the truncated locale-specific error message that corresponds to errnum. Return Value strerror_s returns the number of characters in the error message. Example #include <stdio.h> #include <errno.h> #include <string.h> int main(void) { unsigned...
size_t strerrorlen_s( errno_t errnum ); (3) (C11 起) 1) 返回指向系统错误码 errnum 的文本表示的指针,它等同于 perror() 会打印的描述。 errnum 通常获得自 errno 对象,不过函数接受任何 int 类型值。字符串的内容是本地环境限定的。 程序必须不修改返回的字符串,但对 strerror 函数的后继调用可...
3) 计算若以 errnum 调用则 strerror_s 本会写入的,本地环境限定错误消息的不截断长度。长度不包含空终止符。 同所有边界检查函数, strerror_s, strerrorlen_s 仅若实现定义了 __STDC_LIB_EXT1__ ,且用户在包含 string.h 前定义 __STDC_WANT_LIB_EXT1__ 为整数常量 1 才保证可用。 参数 errnum - ...
K.3.7.4.3 The strerrorlen_s function (p: 623) C99 standard (ISO/IEC 9899:1999): 7.21.6.2 The strerror function (p: 334) C89/C90 standard (ISO/IEC 9899:1990): 4.11.6.2 The strerror function See also perror displays a character string corresponding of the current error tostderr ...
为什么vs2019编写c语言时strerrorlen_s没有定义_STDC_LIB_EXT1_的作用?你看的是《C语言入门经典》(...