Can't access function from header file

后端 未结 2 1453
滥情空心
滥情空心 2021-01-22 05:04
//head.h//
extern int sum(int,int);
//head.cpp//

#include \"head.h\"
#include \"stdafx.h\"
int sum(int x, int y)
{
return (x+y);
}
         


        
2条回答
  •  借酒劲吻你
    2021-01-22 05:42

    Either remove stdafx.h from the project, and turn of precompiled headers.. or try moving head.h to be included after stdafx.h instead of before.

提交回复
热议问题