D
dharmesh Gupta
Hi All,
i am new to header files , and have a basic question ,
i have made my program in three files namely,
idr_bpl.cpp( contains class definitions and function definitions)
bpl.cpp( contains main() function)
bpl.h (contains variable definition of a variable that is shared in
the above two files )
right now i have included "idr_bpl.cpp", "idr.h" and other standard
files (like iostream etc........) in bpl.cpp and
"idr.h" and other standard files in idr_bpl.cpp
now, as suggested by one google friend that it is not a good practice
to include a cpp file in another cpp file , i want to make header
files for separating the definitions and implementation,
the point to be noted is that there are 2 classes(namely body and
header) defined in idr_bpl.cpp and the second class's(header's) one
function uses the object of the other class(body).
can anyone help me arranging my code in proper header files, since i
will have to make several such programs in future.
Thanks
Dharmesh
i am new to header files , and have a basic question ,
i have made my program in three files namely,
idr_bpl.cpp( contains class definitions and function definitions)
bpl.cpp( contains main() function)
bpl.h (contains variable definition of a variable that is shared in
the above two files )
right now i have included "idr_bpl.cpp", "idr.h" and other standard
files (like iostream etc........) in bpl.cpp and
"idr.h" and other standard files in idr_bpl.cpp
now, as suggested by one google friend that it is not a good practice
to include a cpp file in another cpp file , i want to make header
files for separating the definitions and implementation,
the point to be noted is that there are 2 classes(namely body and
header) defined in idr_bpl.cpp and the second class's(header's) one
function uses the object of the other class(body).
can anyone help me arranging my code in proper header files, since i
will have to make several such programs in future.
Thanks
Dharmesh