我知道在 C++ 中,您可以使用以下命令查看下一个字符:in.peek();
.
当尝试“查看”C 中文件的下一个字符时,我该如何解决这个问题?
fgetc http://opengroup.org/onlinepubs/007908799/xsh/fgetc.html+ungetc http://opengroup.org/onlinepubs/007908799/xsh/ungetc.html。也许是这样的:
int fpeek(FILE *stream)
{
int c;
c = fgetc(stream);
ungetc(c, stream);
return c;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)