Borderou de evaluare (job #1831667)
Utilizator | Data | 18 decembrie 2016 15:10:16 | |
---|---|---|---|
Problema | Elicoptere | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:6:28: error: ‘double y1 [105]’ redeclared as different kind of symbol
double x,y,k,x1[105],y1[105],x2[105],y2[105],x3[105],y3[105];
^
In file included from /usr/include/features.h:357:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39,
from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420,
from /usr/include/c++/4.8/iosfwd:38,
from /usr/include/c++/4.8/ios:38,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:243:1: error: previous declaration of ‘double y1(double)’
__MATHCALL (y1,, (_Mdouble_));
^
user.cpp: In function ‘int main()’:
user.cpp:38:22: warning: pointer to a function used in arithmetic [-Wpointer-arith]
{fin>>x1[i]>>y1[i]>>x2[i]>>y2[i]>>x3[i]>>y3[i];
^
user.cpp:38:9: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’
{fin>>x1[i]>>y1[i]>>x2[i]>>y2[i]>>x3[i]>>y3[i];
^
In file included from /usr/include/c++/4.8/fstream:38:0,
from user.cpp:1:
/usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = double(double)throw ()]’
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^
user.cpp:45:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
A=y2[i]-y1[i];
^
user.cpp:45:26: error: invalid operands of types ‘double’ and ‘double(double)throw ()’ to binary ‘operator-’
user.cpp:47:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
C=x2[i]*y1[i]-x1[i]*y2[i];
^
user.cpp:47:26: error: invalid operands of types ‘double’ and ‘double(double)throw ()’ to binary ‘operator*’
user.cpp:48:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(A!=0&&y1[j]>=min(y1[i],y2[i])&&y1[j]<=max(y1[i],y2[i])){
^
user.cpp:48:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(A!=0&&y1[j]>=min(y1[i],y2[i])&&y1[j]<=max(y1[i],y2[i])){
^
user.cpp:48:45: error: no matching function for call to ‘min(double (&)(double)throw (), double&)’
if(A!=0&&y1[j]>=min(y1[i],y2[i])&&y1[j]<=max(y1[i],y2[i])){
^
user.cpp:48:45: note: candidates are:
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !