On Tuesday, 24 July 2012 20:12:07 UTC-4, gdo...@gmail.com wrote:
> this code sample is taken from "A Book on C"
>
> char s[100];
>
> strcpy (s, "ABC"
;
>
> ...
>
> the compiler issues a warning. Implicitly declaring C library function 'strcpy' with type 'char*(char *,const char *)'
>
> Why does the compiler issue this warning, what does it mean, and what is the fix? compiler is LLVM 3.1
I guess you were using Clang as the C/C++ front-end. In C
one can declare a function implicitly, by invoking the
function. I presume that Clang is aware of the standard
function 'strcpy', and issued a warning that you implicitly
declared a C library function.
Solution: have the 'string.h' header included in your
relevant source code file(s).
PS: this is a very common problem, you should have used
Google first.
-- Zoltan