datum.cpp:5:11: error: 'int y1' redeclared as different kind of symbol
int d1,m1,y1;
^~
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533,
from /usr/include/c++/7/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
from datum.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:251:1: note: previous declaration 'double y1(double)'
__MATHCALL (y1,, (_Mdouble_));
^
datum.cpp: In function 'void convert_st()':
datum.cpp:21:87: error: assignment of function 'double y1(double)'
y1=int(year1[0]-'0')*1000+int(year1[1]-'0')*100+int(year1[2]-'0')*10+int(year1[3]-'0');
^
datum.cpp:21:87: error: cannot convert 'int' to 'double(double) throw ()' in assignment
datum.cpp: In function 'bool check()':
datum.cpp:59:11: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if(d==31 && m==2 || m==4 || m==6 || m==9 || m==11)return false;
~~~~~~^~~~~~~
datum.cpp:64:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(d<=d1 && m<=m1 && y==y1)return false;
^~
datum.cpp: In function 'void solve()':
datum.cpp:71:19: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
construct_date(y1);
^
datum.cpp:24:6: note: initializing argument 1 of 'void construct_date(int)'
void construct_date(int y)
^~~~~~~~~~~~~~
datum.cpp:72:8: error: invalid conversion from 'double (*)(double) throw ()' to 'int' [-fpermissive]
int i=y1;
^~
datum.cpp: In function 'int convert_dec(int)':
datum.cpp:52:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^