I'm trying to import a .h file I wrote, but I get the following error:
$ g++ HeartRate.cpp
In file included from HeartRate.cpp:3:
In file included from ./HeartRate.h:2:
./Date.h:4:7: error: redefinition of 'Date'
class Date {
^
./Date.h:4:7: note: previous definition is here
class Date {
^
1 error generated.
This is the file I'm trying to import:
#include <iostream>
#include <string>
class Date {
private:
//...
public:
//...
};