Main.cc: In function 'int main()':
Main.cc:8:13: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
8 | if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) {
| ^
Main.cc:8:68: error: expected ';' before '{' token
8 | if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) {
| ^~
| ;
Main.cc:8:48: warning: statement has no effect [-Wunused-value]
8 | if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Main.cc:11:9: error: expected primary-expression before 'else'
11 | else cout<<"No"<<endl;
| ^~~~
Main.cc:10:10: error: expected ')' before 'else'
10 | }
| ^
| )
11 | else cout<<"No"<<endl;
| ~~~~
Main.cc:8:12: note: to match this '('
8 | if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) {
| ^