c51创建头文件问题
//**********main.c*************
#include "stc12c5a60s2.h"
#include "nothing.h"
void main()
{
x=1;
function();
}
//*******************************
//***************nothing.h*********
#ifndef __NOTHING_H__
#define __NOTHING_H__
#include "stc12c5a60s2.h"
extern uchar x;
void funtion();
#endif
//*********************************
//*************nothing.c**********
#include "nothing.h"
uchar x;
void function()
{
if(x)
P2=0;
}
//***************************
警告提示:MAIN.C(9): warning C206: 'function': missing function-prototype
[解决办法]
extern void funtion();
void main()
。。。
[解决办法]