Thread: Complete newbie is lost

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    4

    Unhappy Complete newbie is lost

    Hey all. First post so please be gentle :P

    Ive written a few simple c programs before, but Ive been launched straight into the deep end on this one. Then I found out the deep end has sharks!

    Ive got to write a database module B that deals with commands received from module A.

    My code must be contained in a single file named database.c and all function prototypes for module B must be declared in a header file database.h, so that userInterface.c can include this.

    Can anyone point me in the direction of a good tutorial that would help me with any part of this?

    Thanks in advance for any help you can give me. im freaking out a bit at the mo, so apologies for any skittish posts!

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    There are lots of tutorials and threads about using multiple files in C. http://www.google.ca/search?hl=en&q=...e+Search&meta=

    The first question is: what compiler or editor are you using? The process for using multiple files varies between them.

    For example, in Dev-C++ you create a project, and add your source files to this project. When you compile, it will link all of your source files together. (Actually, this is the basic idea for any editor.)

    As for header files . . . there's lots of stuff around about them, too. http://www.google.ca/search?hl=en&q=...e+Search&meta=
    They're also a little simpler to use. You don't need to add them to a project or anything -- it should just compile, provided you put the header file in the right location. The same directory as the .c files is a good start.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. complete newbie help
    By terracota in forum Windows Programming
    Replies: 4
    Last Post: 11-11-2004, 05:44 PM
  2. I lost my laptop, DVD and money
    By Sang-drax in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 10-01-2004, 07:13 PM
  3. Complete Open GL Newbie
    By Krak in forum Game Programming
    Replies: 21
    Last Post: 05-01-2003, 08:19 AM
  4. Complete programming newbie - C or C++
    By Blobby in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 02-17-2003, 10:14 AM
  5. Need some really simple help (complete Linux newbie)
    By Hannwaas in forum Linux Programming
    Replies: 11
    Last Post: 12-10-2001, 03:16 PM