Problem cuberoot
User sthe2nd
Submission Time 2026-06-25 15:52:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cuberoot.cpp: In function ‘int main()’:
cuberoot.cpp:12:18: error: ISO C++ forbids using pointer to a function in subtraction [-fpermissive]
12 | int mid = (left-right)/2;
| ~~~~^~~~~~
cuberoot.cpp:15:16: error: ‘x’ was not declared in this scope
15 | if (cubed == x) {
| ^
cuberoot.cpp:19:9: error: assignment of function ‘std::ios_base& std::left(std::ios_base&)’
19 | left = mid + 1;
| ~~~~~^~~~~~~~~
cuberoot.cpp:21:10: error: assignment of function ‘std::ios_base& std::right(std::ios_base&)’
21 | right = mid;
| ~~~~~~^~~~~