记录详情

Compile Error

/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;
                      ^~~

信息

递交者
类型
递交
语言
C++
递交时间
2023-06-19 17:20:27
评测时间
2023-06-19 17:20:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes