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!
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.