How to implement several source files?

This is a discussion on How to implement several source files? within the C Programming forums, part of the General Programming Boards category; Gades wrote: What I want to have, is a shorter code, so I thought about dividing it in parts; like ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    207

    Unhappy How to implement several source files?

    Gades wrote:
    What I want to have, is a shorter code, so I thought about dividing it in parts; like menus and calculations

    ***************

    Salem wrote:
    This is a good idea - whay you would end up with is several source files containing the code, and perhaps a single .h file describing the interfaces

    ***************

    Now I want to implement the calculations in my program, but separated as I said.

    I like Salem's idea, but I don't know how to "make it" (I can't think of an Enlish expression, sorry).

    Any help?

  2. #2
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    What you would basically do is connect the source files (.c) to each other via a header file (.h). You would, summed up, aquire this by using the #include (don't forget with double quotes, not < and >).

    --Garfield
    1978 Silver Anniversary Corvette

  3. #3
    Unregistered
    Guest
    Thanks Garfield.

    Now I'm being told more or less how to do it (not more or less, totally )

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    207
    Obviously that was me, I forgot to login.

    Thanks again

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 06-04-2009, 09:45 PM
  2. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 09:36 AM
  3. pseudocode for multiple source files
    By Calef13 in forum C++ Programming
    Replies: 4
    Last Post: 11-13-2007, 09:07 AM
  4. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02:30 PM
  5. Linker errors - Multiple Source files
    By nkhambal in forum C Programming
    Replies: 3
    Last Post: 04-24-2005, 03:41 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21