M
mead
This is from an article:
"Given a.h and a.cpp files, a.h has been included as the first header file
in a.cpp. This will make sure that a.h does not expect a certain header
files to be included before a.h. As a.h has been included as the first file,
successful compilation of a.cpp will ensure that a.h does not expect any
other header file to be included before a.h. If this is followed for all
classes, (i.e. x.cpp always includes x.h as the first header) there will be
no dependency on header file inclusion."
Why include a.h as first included file of a.cpp?
What does it mean "As a.h has been included as the first file, successful
compilation of a.cpp will ensure that a.h does not expect any other header
file to be included before a.h"?
What does this mean by "If this is followed for all classes, (i.e. x.cpp
always includes x.h as the first header) there will be no dependency on
header file inclusion."?
Thanks!
"Given a.h and a.cpp files, a.h has been included as the first header file
in a.cpp. This will make sure that a.h does not expect a certain header
files to be included before a.h. As a.h has been included as the first file,
successful compilation of a.cpp will ensure that a.h does not expect any
other header file to be included before a.h. If this is followed for all
classes, (i.e. x.cpp always includes x.h as the first header) there will be
no dependency on header file inclusion."
Why include a.h as first included file of a.cpp?
What does it mean "As a.h has been included as the first file, successful
compilation of a.cpp will ensure that a.h does not expect any other header
file to be included before a.h"?
What does this mean by "If this is followed for all classes, (i.e. x.cpp
always includes x.h as the first header) there will be no dependency on
header file inclusion."?
Thanks!