• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How are stdlib.h and time.h imported?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How are stdlib.h and time.h imported?
      • From: Boris Remizov <email@hidden>
    • Re: How are stdlib.h and time.h imported?
      • From: Frédéric Testuz <email@hidden>
  • Prev by Date: Re: Problem with NSMutableDictionary
  • Next by Date: Re: How are stdlib.h and time.h imported?
  • Previous by thread: Mysterious crash in loaded nib (sorry for the double-post)
  • Next by thread: Re: How are stdlib.h and time.h imported?
  • Index(es):
    • Date
    • Thread