I have a main.c
which call a function downsample
which is defined in downMain.c
The prototype of downsample
is
short int downsample(short int input);
In downMain.h
i have this function prototype and downMain.c
contains definition of the function.
I got below error when compiling
E:\demo\main.c(9) : error C2371: 'downsample' : redefinition; different basic types
Is it posible to return short int
? Why am i getting this error, solution please?!
EDit:
I include downMain.h in main.c
Content of downMain.c
int call_downsample(int key) {
if(key == 1)
downsample(data);
return 0;
}
downsample
function contains simple skip-copy for loop
content of downMain.h
int call_downsample(int key);
short int downsample(short int data);