【发布时间】:2016-08-18 02:18:54
【问题描述】:
FILE *in_fp;
void getChar()
{
if ((nextChar = getc(in_fp)) != EOF)
{
if (isalpha(nextChar))
charClass = LETTER;
else if (isdigit(nextChar))
charClass = DIGIT;
else charClass = UNKNOWN;
}
else
charClass = EOF;
}
我想要 c++ 中的函数等效函数 getc() 我搜索但我没有找到
注意 如果我使用 FILE,编译器会显示此错误
source.cpp(47): error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
【问题讨论】: