Run id: 112413
Main.cc: In function 'int main()':
Main.cc:15:19: error: no matching function for call to 'abs()'
x=abs()a[i]-a[j];
^
In file included from /usr/include/c++/5/cstdlib:72:0,
from /usr/include/c++/5/ext/string_conversions.h:41,
from /usr/include/c++/5/bits/basic_string.h:5249,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^
/usr/include/stdlib.h:774:12: note: candidate expects 1 argument, 0 provided
In file included from Main.cc:5:0:
/usr/include/c++/5/cmath:99:5: note: candidate: template constexpr typename __gnu_cxx::__enable_if::__value, double>::__type std::abs(_Tp)
abs(_Tp __x)
^
/usr/include/c++/5/cmath:99:5: note: template argument deduction/substitution failed:
Main.cc:15:19: note: candidate expects 1 argument, 0 provided
x=abs()a[i]-a[j];
^
In file included from Main.cc:5:0:
/usr/include/c++/5/cmath:91:3: note: candidate: constexpr long double std::abs(long double)
abs(long double __x)
^
/usr/include/c++/5/cmath:91:3: note: candidate expects 1 argument, 0 provided
/usr/include/c++/5/cmath:87:3: note: candidate: constexpr float std::abs(float)
abs(float __x)
^
/usr/include/c++/5/cmath:87:3: note: candidate expects 1 argument, 0 provided
/usr/include/c++/5/cmath:81:3: note: candidate: constexpr double std::abs(double)
abs(double __x)
^
/usr/include/c++/5/cmath:81:3: note: candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/5/ext/string_conversions.h:41:0,
from /usr/include/c++/5/bits/basic_string.h:5249,
from /usr/include/c++/5/string:52,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from Main.cc:1:
/usr/include/c++/5/cstdlib:174:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^
/usr/include/c++/5/cstdlib:174:3: note: candidate expects 1 argument, 0 provided
/usr/include/c++/5/cstdlib:166:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^
/usr/include/c++/5/cstdlib:166:3: note: candidate expects 1 argument, 0 provided