How are stdlib.h and time.h imported?
How are stdlib.h and time.h imported?
- Subject: How are stdlib.h and time.h imported?
- From: "Frank Bettger" <email@hidden>
- Date: Mon, 20 Aug 2007 20:37:41 +0200
Started to read Hillegass book,
In his first example he uses three C functions random() , srandom and
time(). But he doesn't explain much where they come from or how the compiler
finds them. Not knowing so much about C, I tried to look them up from Xcode
by choosing Help->Documentation and then searching for these words. Here's
what I've found.
#include <stdlib.h>
long random(void);
void srandom(unsigned long seed);
#include <time.h>
time_t time(time_t *tloc);
Here is my question
How does the compile find random() and time(). According to the docs you
should import stdlib.h and time.h, but Hillegass code does not import any of
them. The only thing imported in Hillegass code is <Cocoa/Cocoa.h>, and I've
looked in that file and do not see any imports of time.h and stdlib.h?
Thanks Frank
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden