Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:61:12: error: call to 'abs' is ambiguous
    return std::abs(x1 - x2) + std::abs(y1 - y2);
           ^~~~~~~~
/usr/include/stdlib.h:837:12: note: candidate function
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:56:3: note: candidate function
  abs(long __i) { return __builtin_labs(__i); }
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:61:3: note: candidate function
  abs(long long __x) { return __builtin_llabs (__x); }
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:70:3: note: candidate function
  abs(double __x)
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:74:3: note: candidate function
  abs(float __x)
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:78:3: note: candidate function
  abs(long double __x)
  ^
In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:61:32: error: call to 'abs' is ambiguous
    return std::abs(x1 - x2) + std::abs(y1 - y2);
                               ^~~~~~~~
/usr/include/stdlib.h:837:12: note: candidate function
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:56:3: note: candidate function
  abs(long __i) { return __builtin_labs(__i); }
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:61:3: note: candidate function
  abs(long long __x) { return __builtin_llabs (__x); }
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:70:3: note: candidate function
  abs(double __x)
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:74:3: note: candidate function
  abs(float __x)
  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_abs.h:78:3: note: candidate function
  abs(long double __x)
  ^
2 errors generated.
/in/Compile/Makefile:16: recipe for target 'main' failed
make: *** [main] Error 1

Information

Submit By
Type
Submission
Homework
Project3
Language
C++
Submit At
2024-11-26 17:29:05
Judged At
2024-11-26 17:29:05
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes