|
-
August 10th, 2010, 08:37 AM
#2
Re: Working with multiple cpp and h files
Yes, it makes sense. The general idea is that source code in C/C++ is split in 2 files: headers (usually) contain declarations of types, functions, constants, etc. CPP files contain the implementation of those types, functions, etc. All you have to do to make available in a file B.cpp the symbols (functions, types, etc.) defined and implemented in the pair A.h/A.cpp, is to include the header A.h. Of course this is true if you use a development environment that supports projects and you just add files to the project (and set building options). If you want to manually build the sources from command line, than there's another story. So what do you use for creating your application?
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
|