#pragma once
#include <string>
class People
{
public:
People(std::string n, Birthday obj);
void printInfo();
private:
std::string name;
Birthday dob;
};
Points to note.
1. Assuming that various header files have already been included will mess you about. It's best to make each file self-contained by including what it specifically needs.
2. Being a header file, you don't want to use using namespace std;. So write string in it's fully qualified form as std::string.
people.cpp
1 2 3 4 5 6 7
void People::printInfo()
{
cout << name << "was born on ";
dob.printDate();
cout << endl;
}
Your dob.printDate() doesn't return an ostream reference, so it can't be used as
cout << name << "was born on " << dob.printDate() << endl;