foo.cc: In function 'int main()':
foo.cc:32:16: error: 'Time::Time(int, int, int)' is private within this context
32 | Time t(h, s, m);
| ^
foo.cc:6:2: note: declared private here
6 | Time(int h,int m,int s){
| ^~~~
foo.cc:35:10: error: 'void Time::Add(int)' is private within this context
35 | t.Add(ss);
| ^
foo.cc:14:7: note: declared private here
14 | void Add(int s) {
| ^~~
foo.cc:36:11: error: 'void Time::Output()' is private within this context
36 | t.Output();
| ^
foo.cc:11:7: note: declared private here
11 | void Output() {
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务