Hello I'm having trouble with this problem given to us.
We are given three files. One .cpp file WITH an int main(), one .cpp file WITHOUT an int main(), and a .h file (I'll name the two .cpp files .cpp(1) and .cpp(2) respectively).
The .h file contains a class it declares.
The .cpp(2) file contains the functions related to this class.
The .cpp(1) file contains the int main(), #include the .h file, and has hard coded input. It does not #include the .cpp(2) file so it fails to compile.
I #include-d the .cpp(2) file and it compiles successfully however there are two rules in this homework:
- Keep all three files separately
- Do not
#includeimplementation files (which is what I assume .cpp(2) is)
I cannot post the full code for legal reasons but I can answer any clarifications on the code/program.
(this is also a terminal based program)
Thank you!