/in/foo.cc:22:26: error: expected ';' after class definition
22 | }
| ^
| ;
/in/foo.cc: In member function 'bool Date::isLeap(int)':
/in/foo.cc:12:41: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
12 | return y%400==0||y%4==0 && y%100==0;
| ~~~~~~~^~~~~~~~~~~
/in/foo.cc: At global scope:
/in/foo.cc:23:17: error: expected declaration before '}' token
23 | }
| ^
/in/foo.cc:24:9: error: expected declaration before '}' token
24 | }
| ^
/in/foo.cc: In function 'void addSeconds(int)':
/in/foo.cc:26:9: error: 'second' was not declared in this scope
26 | second += num;
| ^~~~~~
/in/foo.cc:29:13: error: 'minute' was not declared in this scope
29 | minute++;
| ^~~~~~
/in/foo.cc:32:17: error: 'hour' was not declared in this scope
32 | hour++;
| ^~~~
/in/foo.cc:35:21: error: 'day' was not declared in this scope
35 | day++;
| ^~~
/in/foo.cc:36:44: error: 'year' was not declared in this scope
36 | if (day > YearMonthDay(year, month)) {
| ^~~~
/in/foo.cc:36:50: error: 'month' was not declared in this scope
36 | if (day > YearMonthDay(year, month)) {
| ^~~~~
/in/foo.cc:36:31: error: 'YearMonthDay' was not declared in this scope
36 | if (day > YearMonthDay(year, month)) {
| ^~~~~~~~~~~~
/in/foo.cc: In function 'void print()':
/in/foo.cc:49:23: error: 'year' was not declared in this scope
49 | cout<<year<<" "<<month<<" "<<day<<" "<<hour<<" "<<minute<<" "<<second<<endl;
| ^~~~
/in/foo.cc:49:34: error: 'month' was not declared in this scope
49 | cout<<year<<" "<<month<<" "<<day<<" "<<hour<<" "<<minute<<" "<<second<<endl;
| ^~~~~
/in/foo.cc:49:46: error: 'day' was not declared in this scope
49 | cout<<year<<" "<<month<<" "<<day<<" "<<hour<<" "<<minute<<" "<<second<<endl;
| ^~~
/in/foo.cc:49:56: error: 'hour' was not declared in this scope
49 | cout<<year<<" "<<month<<" "<<day<<" "<<hour<<" "<<minute<<" "<<second<<endl;
| ^~~~
/in/foo.cc:49:67: error: 'minute' was not declared in this scope
49 | cout<<year<<" "<<month<<" "<<day<<" "<<hour<<" "<<minute<<" "<<second<<endl;
| ^~~~~~
/in/foo.cc:49:80: error: 'second' was not declared in this scope
49 | cout<<year<<" "<<month<<" "<<day<<" "<<hour<<" "<<minute<<" "<<second<<endl;
| ^~~~~~
/in/foo.cc: At global scope:
/in/foo.cc:51:1: error: expected declaration before '}' token
51 | };
| ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:58:31: error: no matching function for call to 'Date::Date(int&, int&, int&, int&, int&, int&)'
58 | Date dt(y, m, d, h, min, s);
| ^
/in/foo.cc:20:9: note: candidate: 'Date::Date(int, int, int)'
20 | Date(int y,int m,int d):year(y),month(m),day(d){}
| ^~~~
/in/foo.cc:20:9: note: candidate expects 3 arguments, 6 provided
/in/foo.cc:3:7: note: candidate: 'constexpr Date::Date(const Date&)'
3 | class Date{
| ^~~~
/in/foo.cc:3:7: note: candidate expects 1 argument, 6 provided
/in/foo.cc:3:7: note: candidate: 'constexpr Date::Date(Date&&)'
/in/foo.cc:3:7: note: candidate expects 1 argument, 6 provided
/in/foo.cc:59:8: error: 'class Date' has no member named 'addSeconds'
59 | dt.addSeconds(additionalSeconds);
| ^~~~~~~~~~
/in/foo.cc:60:8: error: 'class Date' has no member named 'print'
60 | dt.print();
| ^~~~~