Mail Archives: djgpp/1997/08/27/21:40:18
>
> I have a program that works fine. However when I compile it with the -Wall
> switch I get the following message:
>
> para.c: In function `main':
> para.c:163: warning: implicit declaration of function `delay' - The
> statement is just a delay(1000);
>
You haven't included the header that has the prototype for 'delay'.
> it still runs ok, and the delay statement works as expected.
>
This is because the compiler makes a "guess" at the prototype and still
links it correctly. If you did this in c++ with its name-mangling you will
more often than not get an error at link time.
I'm not at my own computer so I can't check which header delay is in, but it
is probably stdlib.h. Try looking it up in info, or RHIDE if you have it.
--
Brett Porter
bporter AT rabble DOT uow DOT edu DOT au
http://www.geocities.com/CollegePark/Union/3596
Humour, Programming, and more.
- Raw text -