Problem squarerect
User justin271828
Submission Time 2025-03-03 12:00:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

squarerect.cpp: In function ‘bool am_i_square(int, int)’:
squarerect.cpp:12:7: error: ‘x’ was not declared in this scope
12 | for (x = 80; x > 0; x -= 20) {
| ^
squarerect.cpp:15:16: error: no match for ‘operator=’ (operand types are ‘std::pair<int, int>’ and ‘<brace-enclosed initializer list>’)
15 | temp = {x, 0};
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from squarerect.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:378:7: note: candidate: ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const