Ok, i must be pretty stupid but someone please tell me why the following code
which is saved in a file named date.cpp cannot be compiled while a have also added in the same project the following date.h file:Code:#include "date.h" date::date(){ hour=day=month=year=7;}
Code:#ifndef DATE_H #define DATE_H class date{ // Definition of class Date public: date(); private: int hour; //0-23 int day; int month; int year; } #endif