F
francescomoi
Hi.
I've got a function defined:
------------------
double my_function(char string1[], char string2[])
{
return 2;
}
-----
And I want to call it from my main program:
---------
char *stringA;
char *stringB;
double foo = my_function(stringA, stringB);
------
But I got this warning message:
-----------
prog02.c:64: warning: type mismatch with previous implicit declaration
prog02.c:51: warning: previous implicit declaration of `my_function'
prog02.c:64: warning: `my_function' was previously implicitly declared
to return `int'
--------
Line #51 is << double foo = my_function(stringA, stringB); >>
Line #64 is << double my_function(char string1[], char string2[]) >>
Why am I told that I declarated previously `my_function'?? I think I
din't.
Thank you very much.
I've got a function defined:
------------------
double my_function(char string1[], char string2[])
{
return 2;
}
-----
And I want to call it from my main program:
---------
char *stringA;
char *stringB;
double foo = my_function(stringA, stringB);
------
But I got this warning message:
-----------
prog02.c:64: warning: type mismatch with previous implicit declaration
prog02.c:51: warning: previous implicit declaration of `my_function'
prog02.c:64: warning: `my_function' was previously implicitly declared
to return `int'
--------
Line #51 is << double foo = my_function(stringA, stringB); >>
Line #64 is << double my_function(char string1[], char string2[]) >>
Why am I told that I declarated previously `my_function'?? I think I
din't.
Thank you very much.