F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38004112_21129.cpp: In member function 'double Point::len()':
0_0_38004112_21129.cpp:27:33: error: no matching function for call to 'hypot(double&, double&, double&)'
  double len(){return hypot(x,y,z);}
                                 ^
0_0_38004112_21129.cpp:27:33: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:41,
                 from 0_0_38004112_21129.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:728:25: note: double hypot(double, double)
   extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */
                         ^
GCC4.9.2/x86_64-w64-mingw32/include/math.h:728:25: note:   candidate expects 2 arguments, 3 provided
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:41:0,
                 from 0_0_38004112_21129.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1385:5: note: template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::hypot(_Tp, _Up)
     hypot(_Tp __x, _Up __y)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1385:5: note:   template argument deduction/substitution failed:
0_0_38004112_21129.cpp:27:33: note:   candidate expects 2 arguments, 3 provided
  double len(){return hypot(x,y,z);}
                                 ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:41:0,
                 from 0_0_38004112_21129.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1380:3: note: constexpr long double std::hypot(long double, long double)
   hypot(long double __x, long double __y)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1380:3: note:   candidate expects 2 arguments, 3 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1376:3: note: constexpr float std::hypot(float, float)
   hypot(float __x, float __y)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1376:3: note:   candidate expects 2 arguments, 3 provided
0_0_38004112_21129.cpp: In member function 'double Point::distance(Point)':
0_0_38004112_21129.cpp:28:57: error: no matching function for call to 'hypot(double, double, double)'
  double distance(Point p){return hypot(x-p.x,y-p.y,z-p.z);}
                                                         ^
0_0_38004112_21129.cpp:28:57: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:41,
                 from 0_0_38004112_21129.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:728:25: note: double hypot(double, double)
   extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */
                         ^
GCC4.9.2/x86_64-w64-mingw32/include/math.h:728:25: note:   candidate expects 2 arguments, 3 provided
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:41:0,
                 from 0_0_38004112_21129.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1385:5: note: template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::hypot(_Tp, _Up)
     hypot(_Tp __x, _Up __y)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1385:5: note:   template argument deduction/substitution failed:
0_0_38004112_21129.cpp:28:57: note:   candidate expects 2 arguments, 3 provided
  double distance(Point p){return hypot(x-p.x,y-p.y,z-p.z);}
                                                         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:41:0,
                 from 0_0_38004112_21129.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1380:3: note: constexpr long double std::hypot(long double, long double)
   hypot(long double __x, long double __y)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1380:3: note:   candidate expects 2 arguments, 3 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1376:3: note: constexpr float std::hypot(float, float)
   hypot(float __x, float __y)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:1376:3: note:   candidate expects 2 arguments, 3 provided


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-01-10 11:39:28, Gzip enabled