如何显示:unexpected end of file while looking for precompiled header directive
怎么显示:unexpected end of file while looking for precompiled header directive
在MFC里,我添加了两个文件如下:
/////////a.cpp
int add (int x,int y)
{
return x + y;
}
/////////a.h
int add (int x,int y);
/////////
然后把a.h添加到stdafx.h里,怎么显示a.cpp里有错误:unexpected end of file while looking for precompiled header directive。求助。
------解决方案--------------------
在a.h和a.cpp都加入
#include "stdafx.h "
在MFC里,我添加了两个文件如下:
/////////a.cpp
int add (int x,int y)
{
return x + y;
}
/////////a.h
int add (int x,int y);
/////////
然后把a.h添加到stdafx.h里,怎么显示a.cpp里有错误:unexpected end of file while looking for precompiled header directive。求助。
------解决方案--------------------
在a.h和a.cpp都加入
#include "stdafx.h "