/in/foo.cc: In member function 'void Person::printInfo()':
/in/foo.cc:29:38: error: 'int Date::year' is private within this context
cout << name << " " << birth.year << "-" << birth.month << "-" << birth.day
^~~~
/in/foo.cc:7:9: note: declared private here
int year, month, day;
^~~~
/in/foo.cc:29:59: error: 'int Date::month' is private within this context
cout << name << " " << birth.year << "-" << birth.month << "-" << birth.day
^~~~~
/in/foo.cc:7:15: note: declared private here
int year, month, day;
^~~~~
/in/foo.cc:29:81: error: 'int Date::day' is private within this context
cout << name << " " << birth.year << "-" << birth.month << "-" << birth.day
^~~
/in/foo.cc:7:22: note: declared private here
int year, month, day;
^~~
/in/foo.cc:30:29: error: 'int Date::year' is private within this context
<< " " << leave.year << "-" << leave.month << "-" << leave.day << endl;
^~~~
/in/foo.cc:7:9: note: declared private here
int year, month, day;
^~~~
/in/foo.cc:30:50: error: 'int Date::month' is private within this context
<< " " << leave.year << "-" << leave.month << "-" << leave.day << endl;
^~~~~
/in/foo.cc:7:15: note: declared private here
int year, month, day;
^~~~~
/in/foo.cc:30:72: error: 'int Date::day' is private within this context
<< " " << leave.year << "-" << leave.month << "-" << leave.day << endl;
^~~
/in/foo.cc:7:22: note: declared private here
int year, month, day;
^~~