Below are the code of I believe: Composition
Error found[3]:::'Birthday' hasn't been declared
::'Birthday' does not name a type
::no matching function for call to 'Person::Person(const char[11],Birthday& )
void Person::printPerson()
{
cout << name << "was born on: ";
dateOfBirth.printDate();
}
----------------------------------------------------------------------
I was brainstorming eversince yesterday to solve the error =\.But ended up head over heels
you have a plethora of unnecessary include statements. hell, even your Person.h file itself has an include "person.h" statement. you should also avoid using namespace directive in header files. i'm pretty sure all i did was get rid of those and it compiled fine.
Aqim Perrywas born on: 12/22/1995
you need space before was
1 2 3 4 5
void Person::printPerson()
{
cout << name << " was born on: ";
dateOfBirth.printDate();
}
or
1 2 3 4 5
void Person::printPerson()
{
cout << name << " " << "was born on: ";
dateOfBirth.printDate();
}