Borderou de evaluare (job #2799576)
Utilizator | Data | 13 noiembrie 2021 13:00:33 | |
---|---|---|---|
Problema | Qtri | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:33:138: error: no matching function for call to 'abs(const char [4])'
33 | A(a.x),A(a.y),A(b.x),A(b.y),A(c.x),A(c.y),A(d.x),A(d.y),G<<(abs(D(a,b,d))+abs(D(a,c,d))+abs(D(b,c,d)==abs(D(a,b,c))?"DA\n":"NU\n");
| ^
In file included from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from main.cpp:1:
/usr/include/stdlib.h:840:12: note: candidate: 'int abs(int)' (near match)
840 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~
/usr/include/stdlib.h:840:12: note: conversion of argument 1 would be ill-formed:
main.cpp:33:124: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
33 | A(a.x),A(a.y),A(b.x),A(b.y),A(c.x),A(c.y),A(d.x),A(d.y),G<<(abs(D(a,b,d))+abs(D(a,c,d))+abs(D(b,c,d)==abs(D(a,b,c))?"DA\n":"NU\n");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
| |
| const char*
In file included from /usr/include/c++/10/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from main.cpp:1:
/usr/include/c++/10/bits/valarray_after.h:445:5: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_UnClos<std::_Abs, std::_ValArray, _Tp>, _Tp> std::abs(const std::valarray<_Tp>&)'
445 | _DEFINE_EXPR_UNARY_FUNCTION(abs, _Abs)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/valarray_after.h:445:5: note: template argument deduction/substitution failed:
main.cpp:33:138: note: mismatched types 'const std::valarray<_Tp>' and 'const char [4]'
33 | A(a.x),A(a.y),A(b.x),A(b.y),A(c.x),A(c.y),A(d.x),A(d.y),G<<(abs(D(a,b,d))+abs(D(a,c,d))+abs(D(b,c,d)==abs(D(a,b,c))?"DA\n":"NU\n");
| ^
In file included from /usr/include/c++/10/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from main.cpp:1:
/usr/include/c++/10/bits/valarray_after.h:445:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_UnClos<std::_Abs, std::_Expr, _Dom>, typename _Dom::value_type> std::abs(const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
445 | _DEFINE_EXPR_UNARY_FUNCTION(abs, _Abs)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/valarray_after.h:445:5: note: template argument deduction/substitution failed:
main.cpp:33:138: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'const char [4]'
33 | A(a.x),A(a.y),A(b.x),A(b.y),A(c.x),A(c.y),A(d.x),A(d.y),G<<(abs(D(a,b,d))+abs(D(a,c,d))+abs(D(b,c,d)==abs(D(a,b,c))?"DA\n":"NU\n");
| ^
In file included from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from main.cpp:1:
/usr/include/c++/10/complex:625:5: note: candidate: 'template<class _Tp> _Tp std::abs(const std::complex<_Tp>&)'
625 | abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); }
| ^~~
/usr/include/c++/10/complex:625:5: note: template argument deduction/substitution failed:
main.cpp:33:138: note: mismatched types 'const std::complex<_Tp>' and 'const char [4]'
33 | A(a.x),A(a.y),A(b.x),A(b.y),A(c.x),A(c.y),A(d.x),A(d.y),G<<(abs(D(a,b,d))+abs(D(a,c,d))+abs(D(b,c,d)==abs(D(a,b,c))?"DA\n":"NU\n");
| ^
In file included from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from main.cpp:1:
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !