Y
ypjofficial
Hello all,
I have written a class with many private data members.and i am putting
it in a separate dll file.
Now when i link that file while writing my main program
module,natuarally i have to use the header file of the class developed
by me to access its functionality.
so what should be there in the header file?
Only the public methods declaration / data members of that class or the
whole layout of the class along with its all private members?
(
IMO the private section restricts the accessibility of the class and
the user of the class is abstracted from the exact layout of the
class.So there should be no need to show the internal layout of my
class by putting the private variable inside the header file of that
class.
)
I encountered severe crasing problem when I declare the class without
the private members in the header file? but everything works fine when
i put the exact layout of the class correctly inside the header file.
(i have defined all the public methods inside a separate cpp file with
the scope resolution operator)
Thanks and Regards,
Yogesh
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
I have written a class with many private data members.and i am putting
it in a separate dll file.
Now when i link that file while writing my main program
module,natuarally i have to use the header file of the class developed
by me to access its functionality.
so what should be there in the header file?
Only the public methods declaration / data members of that class or the
whole layout of the class along with its all private members?
(
IMO the private section restricts the accessibility of the class and
the user of the class is abstracted from the exact layout of the
class.So there should be no need to show the internal layout of my
class by putting the private variable inside the header file of that
class.
)
I encountered severe crasing problem when I declare the class without
the private members in the header file? but everything works fine when
i put the exact layout of the class correctly inside the header file.
(i have defined all the public methods inside a separate cpp file with
the scope resolution operator)
Thanks and Regards,
Yogesh
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]