gpt4 book ai didi

c++ - MFC 无法识别文件类型

转载 作者:行者123 更新时间:2023-11-30 01:29:48 25 4
gpt4 key购买 nike

我在我的 MFC 项目中使用 FILE 类型,但在编译后,它显示以下错误:

Error   23  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 24 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 22 error C2146: syntax error : missing ';' before identifier 'm_pFileW'

这些错误是指这段代码:

FILE *m_pFileW;

我是否缺少任何库头来使用 FILE 语法?我是否需要使用不同的方法并替换 FILE 语法?只有当我将它放入我的 MFC 项目时才会生成此错误。这不会发生在 C++ 控制台中。请帮忙。

谢谢。

最佳答案

最终,它存在于 stdio 中,因此您需要:

#include <stdio.h>

关于c++ - MFC 无法识别文件类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5314504/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com