hello there,
when i was going through separate interface for implememtation where writing the classes in some file .h and the class member function in someother file .cpp.
my question here is in the .h file. while writing the classes we tend to include #ifndef, #define and #endif. like for example
can any one please tell me why is that and what is the use of including that in the header file.Code:#include DATE1_H --->> what is the need of thos ?? #define DATE1_H --->> " ?? class date { private: int day; int month; int year; public: date(int, int, int); date(); void setdate(int, int, int); bool isleap(); void printdate(); }; #endif ----->> what is the need of this??
thax very much



LinkBack URL
About LinkBacks


