foo.cc: In member function 'int Date::DayInMonth()':
foo.cc:23:8: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
23 | else return 28; break;
| ^~~~
foo.cc:23:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
23 | else return 28; break;
| ^~~~~
foo.cc: In function 'int main()':
foo.cc:57:19: error: 'Date::Date(int, int, int)' is private within this context
57 | Date date(y, m, d);
| ^
foo.cc:14:2: note: declared private here
14 | Date(int y, int m, int d) {
| ^~~~
foo.cc:59:12: error: 'void Date::add(int)' is private within this context
59 | date.add(n);
| ^
foo.cc:38:7: note: declared private here
38 | void add(int n) {
| ^~~
foo.cc:60:14: error: 'void Date::Output()' is private within this context
60 | date.Output();
| ^
foo.cc:50:7: note: declared private here
50 | void Output() {
| ^~~~~~
foo.cc: In member function 'int Date::DayInMonth()':
foo.cc:37:2: warning: control reaches end of non-void function [-Wreturn-type]
37 | }
| ^
[Hydro](https://hydro.ac)提供评测服务