Thread: Functions in a separate file

  1. #1
    Registered User
    Join Date
    Oct 2007

    Functions in a separate file

    Alrighty, for my next class project, my prof wants me to use separate files to make the program. The constants, #includes and prototypes must be in one file while the main function and any others functions are in another. Using XCode on a mac, how would I go about doing this and how do I connect the files to the main file? I assume thats what I am trying to do.
    Last edited by Fox101; 01-29-2008 at 02:37 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    That's for C++, but some of the ideas apply to C as well.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  2. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  3. Help on simple file functions
    By enjoyincubus in forum C Programming
    Replies: 20
    Last Post: 12-01-2006, 04:41 AM
  4. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM