+ 1

Do I have to include the composition class's header file in the main. cpp

13th Jan 2018, 3:43 PM
I.Guru Prasanna
I.Guru Prasanna - avatar
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
14th Jan 2018, 10:08 PM
Thor Westergren
Thor Westergren - avatar
+ 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
15th Jan 2018, 1:51 AM
Thor Westergren
Thor Westergren - avatar
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?
15th Jan 2018, 1:32 AM
I.Guru Prasanna
I.Guru Prasanna - avatar
0
Thank you
15th Jan 2018, 2:07 AM
I.Guru Prasanna
I.Guru Prasanna - avatar