[Courses] [C]Warnings? (Spoiler on Ex 7-1)

Kathryn Hogg kjh at flyballdogs.com
Wed Mar 6 22:17:49 EST 2002


>>eng_to_metr.c: In function `main':
>>eng_to_metr.c:30: warning: char format, different type arg (arg 4)
>>eng_to_metr.c:34: warning: implicit declaration of function `strcmp'
>>eng_to_metr.c:36: warning: implicit declaration of function `strcpy'
>>
>
> lines 34 and 35 is from you not including string.h where those
> functions are  declared
> #include <string.h> at the beginning of your file
>
> I *think* that you're having problems passing in a pointer to a pointer
> with  &english in sscanf.  english is already a pointer because it's an
> array  variable

Laura is correct on both counts.  Just replace "&english" with "english" in
your sscanf() call and you should be good to go.

--
Kathryn





More information about the Courses mailing list