一、问题:
FILE结构在stdio.h中,可是如下代码已经包含了改头文件了!居然也报错了?
error C2065: 'FILE' : undeclared identifier
#include <stdio.h>
#include "stdafx.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
FILE *p;
return 0;
}
二、解决:
把stdio.h文件放在stdafx.h之后就好了!!!
#include "stdafx.h"
#include <stdio.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
FILE *p;
return 0;
}