|
-
August 10th, 2010, 05:27 AM
#1
Working with multiple cpp and h files
Hi there,
I am currently working on a project where I have to create a program that adds, removes, lists and searches for contacts and contact information stored in a datafile (.dat). I am going to use a few .cpp files like contadd.cpp, contrm.cpp etc but I was just wondering if I have common functions that I want to run in each of these cpp files, should I create a source file called contlib.cpp (with all the function definitions) and a header file contlib.h to put all the function declarations? Do each of the source files need their own header file? And how do I link the functions cpp file to the other source files so that they can see them?
Does this make sense? I can clarify some things if you're confused.
Thanks heaps,
Aonghas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|