Dear c++ gurus,
I'm new in creating a header file. never try before.
ERm... i have write a header file with a program:
Header file: MySensor.H
extern short int DetectSensor(int sensorvalue[10])
{
....;
}
Program file: MyFile.C
#include <MySensor.H>
short int i;
int p, sensorvalue[10];
int getsensorvalue()
{
...;
}
int main()
{
for( p = 0; p < 10; p++)
{
sensorvalue[p] = getsensorvalue();;
}
i = DetectSensor(sensorvalue);
return 0;
}
But it comes out saying that:
Implicit declaration of function 'short int DetectSensor(...)'
What happen? is it relate to my header file format is wrong?
Thanks.
Best regards,
Suraine