+ 1
Do I have to include the composition class's header file in the main. cpp
4 Respostas
+ 4
Yes if you are working with more than one file:
#include <iostream>
# include yourfile.h //your header file here
using namespace std;
Somthing like that
+ 3
Oh.
It should not be necessary to include that header file.
but if the header file is written correct there is no harm in including it different places
by correct i mean that it has a (#ifndef header #define header) intro
0
But my question is if you have another class inside the class your file do I need to include that class header file or not?
0
Thank you