- #1
Lancelot59
- 646
- 1
Hi there everyone.
I have a program I'm going start writing for class with a bunch of functions I want to keep in separate .cpp files for organizations.
So what I'm thinking I could do is create a header and have all the command library include commands in there, as well as the include commands for each of the sub-function .cpp files.
So something like:
Then in the .cpp that houses my main() function I could do this:
Would this work?
I have a program I'm going start writing for class with a bunch of functions I want to keep in separate .cpp files for organizations.
So what I'm thinking I could do is create a header and have all the command library include commands in there, as well as the include commands for each of the sub-function .cpp files.
So something like:
Code:
#include <library>
#include <library>
#include <library>
#include <library>
#include 'function.cpp'
#include 'function.cpp'
Then in the .cpp that houses my main() function I could do this:
Code:
#include 'superawesomeheader.h'
Would this work?