Hi everyone, I seem to be experiencing some problem with the linking of header files. I'm sort of creating Date structures and I have the following files:
- Date.h: Class Date declaration
- Date.cpp: Class Date functions definitions and auxiliary functions
- DateFormat.h: Class DateFormat declaration (used to format Date objects)
- DateFormat.cpp: Class DateFormat functions definitions and auxiliary functions
- BadDate.h: Class BadDate declaration (used to throw exceptions)
Within my main programm I include Date.h, it is compiling well but the linker will give me this error: main_test.cpp||undefined reference to `Date::Date()'. It seems like it can't find the constructors definition within Date.cpp. When I combine the files into one big file above my main function everythin works great. :/