这些版本的 fscanf、_fscanf_l、fwscanf、_fwscanf_l 具有安全增强功能,如 CRT 中的安全功能中所述。 语法 C 复制 int fscanf_s( FILE *stream, const char *format [, argument ]... ); int _fscanf_s_l( FILE *stream, const char *format, _locale_t locale [, argument ]... ); ...
ストリームから書式化されたデータを読み出します。これらの関数は、「CRT のセキュリティ強化」に説明されているように、fscanf、_fscanf_l、fwscanf、_fwscanf_lのセキュリティが強化されたバージョンです。 コピー int fscanf_s( FILE *stream, const char *format [, argument ]... )...
fwscanf_s,_fwscanf_s_l<stdio.h>or<wchar.h> For more compatibility information, seeCompatibility. Example CCopy // crt_fscanf_s.c// This program writes formatted// data to a file. It then uses fscanf to// read the various data back from the file.#include<stdio.h>#include<...
wscanf Functionsfor a description of format*.*fwscanf_s is a wide-character version of fscanf_s; the format argument to fwscanf_s is a wide-character string. These functions behave identically if the stream is opened in ANSI mode. fscanf_s doesn't currently support input from a UNI...
fwscanf_s,_fwscanf_s_l<stdio.h>or<wchar.h> For more compatibility information, seeCompatibility. Example CCopy // crt_fscanf_s.c// This program writes formatted// data to a file. It then uses fscanf to// read the various data back from the file.#include<stdio.h>#include<stdlib.h>...
); int _fscanf_s_l( FILE *stream, const char *format, _locale_t locale [, argument ]... ); int fwscanf_s( FILE *stream, const wchar_t *format [, argument ]... ); int _fwscanf_s_l( FILE *stream, const wchar_t *format, _locale_t locale [, argument ]... ); ...
可选,任何其他可检测错误,例如未知转换指定符 同所有边界检查函数, wscanf_s, fwscanf_s , swscanf_s 仅若实现定义了 __STDC_LIB_EXT1__ ,且用户在包含 <wchar.h> 前定义 __STDC_WANT_LIB_EXT1__ 为整数常量 1 才保证可用。 参数 stream - 要读取的输入文件流 ...
同所有边界检查函数, wscanf_s, fwscanf_s , swscanf_s 仅若实现定义了 __STDC_LIB_EXT1__ ,且用户在包含 <wchar.h> 前定义 __STDC_WANT_LIB_EXT1__ 为整数常量 1 才保证可用。 参数 stream - 要读取的输入文件流 buffer - 指向要读取的空终止宽字符串的指针 format - 指向指定读取输入方式的...
同所有边界检查函数, wscanf_s, fwscanf_s , swscanf_s 仅若实现定义了 __STDC_LIB_EXT1__ ,且用户在包含 <wchar.h> 前定义 __STDC_WANT_LIB_EXT1__ 为整数常量 1 才保证可用。参数stream - 要读取的输入文件流 buffer - 指向要读取的空终止宽字符串的指针 ...
int wscanf_s( const wchar_t *restrict format, ...); (4) (since C11) int fwscanf_s( FILE *restrict stream, const wchar_t *restrict format, ...); (5) (since C11) int swscanf_s( const wchar_t *restrict s, const wchar_t *restrict format, ...); (6) (since C11) Reads ...