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_38272575_26213.cpp:78:33: error: 'enable_if_t' in namespace 'std' does not name a template type
 template <class T, class = std::enable_if_t<std::is_floating_point<T>::value>>
                                 ^
0_0_38272575_26213.cpp:78:44: error: expected '>' before '<' token
 template <class T, class = std::enable_if_t<std::is_floating_point<T>::value>>
                                            ^
0_0_38272575_26213.cpp:122:22: error: template argument 2 is invalid
 T dot(const Point3D<T>& a, const Point3D<T>& b) {
                      ^
0_0_38272575_26213.cpp:122:43: error: template argument 2 is invalid
 T dot(const Point3D<T>& a, const Point3D<T>& b) {
                                           ^
0_0_38272575_26213.cpp: In function 'T dot(const int&, const int&)':
0_0_38272575_26213.cpp:123:12: error: request for member 'x' in 'a', which is of non-class type 'const int'
   return a.x * b.x + a.y * b.y + a.z * b.z;
            ^
0_0_38272575_26213.cpp:123:18: error: request for member 'x' in 'b', which is of non-class type 'const int'
   return a.x * b.x + a.y * b.y + a.z * b.z;
                  ^
0_0_38272575_26213.cpp:123:24: error: request for member 'y' in 'a', which is of non-class type 'const int'
   return a.x * b.x + a.y * b.y + a.z * b.z;
                        ^
0_0_38272575_26213.cpp:123:30: error: request for member 'y' in 'b', which is of non-class type 'const int'
   return a.x * b.x + a.y * b.y + a.z * b.z;
                              ^
0_0_38272575_26213.cpp:123:36: error: request for member 'z' in 'a', which is of non-class type 'const int'
   return a.x * b.x + a.y * b.y + a.z * b.z;
                                    ^
0_0_38272575_26213.cpp:123:42: error: request for member 'z' in 'b', which is of non-class type 'const int'
   return a.x * b.x + a.y * b.y + a.z * b.z;
                                          ^
0_0_38272575_26213.cpp: At global scope:
0_0_38272575_26213.cpp:127:10: error: template argument 2 is invalid
 Point3D<T> det(const Point3D<T>& a, const Point3D<T>& b) {
          ^
0_0_38272575_26213.cpp:127:31: error: template argument 2 is invalid
 Point3D<T> det(const Point3D<T>& a, const Point3D<T>& b) {
                               ^
0_0_38272575_26213.cpp:127:52: error: template argument 2 is invalid
 Point3D<T> det(const Point3D<T>& a, const Point3D<T>& b) {
                                                    ^
0_0_38272575_26213.cpp: In function 'int det(const int&, const int&)':
0_0_38272575_26213.cpp:128:11: error: request for member 'y' in 'a', which is of non-class type 'const int'
   T x = a.y * b.z - a.z * b.y;
           ^
0_0_38272575_26213.cpp:128:17: error: request for member 'z' in 'b', which is of non-class type 'const int'
   T x = a.y * b.z - a.z * b.y;
                 ^
0_0_38272575_26213.cpp:128:23: error: request for member 'z' in 'a', which is of non-class type 'const int'
   T x = a.y * b.z - a.z * b.y;
                       ^
0_0_38272575_26213.cpp:128:29: error: request for member 'y' in 'b', which is of non-class type 'const int'
   T x = a.y * b.z - a.z * b.y;
                             ^
0_0_38272575_26213.cpp:129:11: error: request for member 'z' in 'a', which is of non-class type 'const int'
   T y = a.z * b.x - a.x * b.z;
           ^
0_0_38272575_26213.cpp:129:17: error: request for member 'x' in 'b', which is of non-class type 'const int'
   T y = a.z * b.x - a.x * b.z;
                 ^
0_0_38272575_26213.cpp:129:23: error: request for member 'x' in 'a', which is of non-class type 'const int'
   T y = a.z * b.x - a.x * b.z;
                       ^
0_0_38272575_26213.cpp:129:29: error: request for member 'z' in 'b', which is of non-class type 'const int'
   T y = a.z * b.x - a.x * b.z;
                             ^
0_0_38272575_26213.cpp:130:11: error: request for member 'x' in 'a', which is of non-class type 'const int'
   T z = a.x * b.y - a.y * b.x;
           ^
0_0_38272575_26213.cpp:130:17: error: request for member 'y' in 'b', which is of non-class type 'const int'
   T z = a.x * b.y - a.y * b.x;
                 ^
0_0_38272575_26213.cpp:130:23: error: request for member 'y' in 'a', which is of non-class type 'const int'
   T z = a.x * b.y - a.y * b.x;
                       ^
0_0_38272575_26213.cpp:130:29: error: request for member 'x' in 'b', which is of non-class type 'const int'
   T z = a.x * b.y - a.y * b.x;
                             ^
0_0_38272575_26213.cpp:131:19: error: template argument 2 is invalid
   return Point3D<T>(x, y, z);
                   ^
0_0_38272575_26213.cpp: At global scope:
0_0_38272575_26213.cpp:135:27: error: template argument 2 is invalid
 T distance(const Point3D<T>& a, const Point3D<T>& b) { return (a - b).norm(); }
                           ^
0_0_38272575_26213.cpp:135:48: error: template argument 2 is invalid
 T distance(const Point3D<T>& a, const Point3D<T>& b) { return (a - b).norm(); }
                                                ^
0_0_38272575_26213.cpp: In function 'T distance(const int&, const int&)':
0_0_38272575_26213.cpp:135:71: error: request for member 'norm' in '(a - b)', which is of non-class type 'int'
 T distance(const Point3D<T>& a, const Point3D<T>& b) { return (a - b).norm(); }
                                                                       ^
0_0_38272575_26213.cpp: At global scope:
0_0_38272575_26213.cpp:138:28: error: template argument 2 is invalid
 T distance2(const Point3D<T>& a, const Point3D<T>& b) {
                            ^
0_0_38272575_26213.cpp:138:49: error: template argument 2 is invalid
 T distance2(const Point3D<T>& a, const Point3D<T>& b) {
                                                 ^
0_0_38272575_26213.cpp: In function 'T distance2(const int&, const int&)':
0_0_38272575_26213.cpp:139:26: error: no matching function for call to 'dot(int, int)'
   return dot(a - b, a - b);
                          ^
0_0_38272575_26213.cpp:139:26: note: candidate is:
0_0_38272575_26213.cpp:122:3: note: template<class T> T dot(const int&, const int&)
 T dot(const Point3D<T>& a, const Point3D<T>& b) {
   ^
0_0_38272575_26213.cpp:122:3: note:   template argument deduction/substitution failed:
0_0_38272575_26213.cpp:139:26: note:   couldn't deduce template parameter 'T'
   return dot(a - b, a - b);
                          ^
0_0_38272575_26213.cpp: At global scope:
0_0_38272575_26213.cpp:159:25: error: template argument 2 is invalid
 T volume(const Point3D<T>& a, const Point3D<T>& b,
                         ^
0_0_38272575_26213.cpp:159:46: error: template argument 2 is invalid
 T volume(const Point3D<T>& a, const Point3D<T>& b,
                                              ^
0_0_38272575_26213.cpp:160:25: error: template argument 2 is invalid
          const Point3D<T>& c, const Point3D<T>& d) {
                         ^
0_0_38272575_26213.cpp:160:46: error: template argument 2 is invalid
          const Point3D<T>& c, const Point3D<T>& d) {
                                              ^
0_0_38272575_26213.cpp: In function 'T volume(const int&, const int&, const int&, const int&)':
0_0_38272575_26213.cpp:161:40: error: no matching function for call to 'det(int, int)'
   return std::fabs(dot(det(b - a, c - a), d - a)) / 6.0;
                                        ^
0_0_38272575_26213.cpp:161:40: note: candidate is:
0_0_38272575_26213.cpp:127:12: note: template<class T> int det(const int&, const int&)
 Point3D<T> det(const Point3D<T>& a, const Point3D<T>& b) {
            ^
0_0_38272575_26213.cpp:127:12: note:   template argument deduction/substitution failed:
0_0_38272575_26213.cpp:161:40: note:   couldn't deduce template parameter 'T'
   return std::fabs(dot(det(b - a, c - a), d - a)) / 6.0;
                                        ^
0_0_38272575_26213.cpp: At global scope:
0_0_38272575_26213.cpp:193:31: error: template argument 2 is invalid
   using point_type = Point3D<T>;
                               ^
0_0_38272575_26213.cpp:194:31: error: 'point_type' has not been declared
   using value_type = typename point_type::value_type;
                               ^
0_0_38272575_26213.cpp:196:3: error: 'point_type' does not name a type
   point_type a;
   ^
0_0_38272575_26213.cpp:197:3: error: 'point_type' does not name a type
   point_type b;
   ^
0_0_38272575_26213.cpp:201:16: error: 'point_type' does not name a type
   Line3D(const point_type& a, const point_type& b) : a(a), b(b) {}
                ^
0_0_38272575_26213.cpp:201:37: error: 'point_type' does not name a type
   Line3D(const point_type& a, const point_type& b) : a(a), b(b) {}
                                     ^
0_0_38272575_26213.cpp:203:3: error: 'point_type' does not name a type
   point_type vector() const { return b - a; }
   ^
0_0_38272575_26213.cpp:205:3: error: 'value_type' does not name a type
   value_type norm() const { return vector().norm(); }
   ^
0_0_38272575_26213.cpp:207:23: error: 'point_type' does not name a type
   bool contains(const point_type& p) const {
                       ^
0_0_38272575_26213.cpp:211:3: error: 'value_type' does not name a type
   value_type distance(const point_type& p) const {
   ^
0_0_38272575_26213.cpp: In constructor 'Line3D<T, <template-parameter-1-2> >::Line3D(const int&, const int&)':
0_0_38272575_26213.cpp:201:54: error: class 'Line3D<T, <template-parameter-1-2> >' does not have any field named 'a'
   Line3D(const point_type& a, const point_type& b) : a(a), b(b) {}
                                                      ^
0_0_38272575_26213.cpp:201:60: error: cla


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 00:15:12, Gzip enabled