Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Compilation problems??
phaywood_at_aardvark.apana.org.au.STOP.SPAM (Peter "Shaggy" Haywood) writes:
> Groovy hepcat Programming was jivin' on Mon, 11 Aug 1997 10:12:13
> -0500 in comp.lang.c.
> Compilation problems??'s a cool scene! Dig it!
> >#include "stdio.h"
> First, stdio.h should be enclosed in angle brackets, not quotes. It
> is a standard header file, not a header you've written. Also, I would
This will, however, work. "" will eventually search in the same places as <> - but your suggestion is much better practice.
> include stdlib.h instead. In fact, it couldn't hurt to include them
> both: better safe than sorry, eh.
He *needs* to include stdlib.h - he's called exit() and (more importantly) malloc(), which means he should include the appropriate header file.
> > char *ls_getvalue;
> > ls_getvalue = 0;
> Keep it portable. Use NULL instead of 0 here.
0 is no less portable than NULL - in pointer contexts, a compiler is required to treat 0 as a null pointer constant, no matter what the actual representation is.
(followups to comp.lang.c)
-- Mark Brown mailto:M.A.Brown-4_at_sms.ed.ac.uk (Trying to avoid grumpiness) http://www.geocities.com/SiliconValley/Lakes/7537/Received on Sat Aug 30 1997 - 00:00:00 CDT
![]() |
![]() |