box.cpp: In function 'int main()':
box.cpp:10:15: error: 'max' was not declared in this scope
int x_left = max(px1, qx1);
^~~
box.cpp:10:15: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from box.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
box.cpp:11:16: error: 'min' was not declared in this scope
int x_right = min(px2, qx2);
^~~
box.cpp:11:16: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from box.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
box.cpp:7:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d",&px1,&py1,&px2,&py2);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
box.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d",&qx1,&qy1,&qx2,&qy2);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~