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_24449651_13910.cpp: In function 'double dis(iii, double, double, double)':
0_0_24449651_13910.cpp:9:18: error: request for member 'first' in 'p1.std::pair<int, int>::second', which is of non-class type 'int'
 #define y second.first
                  ^
0_0_24449651_13910.cpp:18:40: note: in expansion of macro 'y'
 return 1.0*(p1.x-tx)*(p1.x-tx)+1.0*(p1.y-ty)*(p1.y-ty)+1.0*(p1.z-tz)*(p1.z-tz);
                                        ^
0_0_24449651_13910.cpp:9:18: error: request for member 'first' in 'p1.std::pair<int, int>::second', which is of non-class type 'int'
 #define y second.first
                  ^
0_0_24449651_13910.cpp:18:50: note: in expansion of macro 'y'
 return 1.0*(p1.x-tx)*(p1.x-tx)+1.0*(p1.y-ty)*(p1.y-ty)+1.0*(p1.z-tz)*(p1.z-tz);
                                                  ^
0_0_24449651_13910.cpp:10:18: error: request for member 'second' in 'p1.std::pair<int, int>::second', which is of non-class type 'int'
 #define z second.second
                  ^
0_0_24449651_13910.cpp:18:64: note: in expansion of macro 'z'
 return 1.0*(p1.x-tx)*(p1.x-tx)+1.0*(p1.y-ty)*(p1.y-ty)+1.0*(p1.z-tz)*(p1.z-tz);
                                                                ^
0_0_24449651_13910.cpp:10:18: error: request for member 'second' in 'p1.std::pair<int, int>::second', which is of non-class type 'int'
 #define z second.second
                  ^
0_0_24449651_13910.cpp:18:74: note: in expansion of macro 'z'
 return 1.0*(p1.x-tx)*(p1.x-tx)+1.0*(p1.y-ty)*(p1.y-ty)+1.0*(p1.z-tz)*(p1.z-tz);
                                                                          ^
0_0_24449651_13910.cpp: In function 'int main()':
0_0_24449651_13910.cpp:9:18: error: request for member 'first' in 'fairy[i].std::pair<int, int>::second', which is of non-class type 'int'
 #define y second.first
                  ^
0_0_24449651_13910.cpp:31:27: note: in expansion of macro 'y'
 cin>>fairy[i].x>>fairy[i].y>>fairy[i].z;
                           ^
0_0_24449651_13910.cpp:10:18: error: request for member 'second' in 'fairy[i].std::pair<int, int>::second', which is of non-class type 'int'
 #define z second.second
                  ^
0_0_24449651_13910.cpp:31:39: note: in expansion of macro 'z'
 cin>>fairy[i].x>>fairy[i].y>>fairy[i].z;
                                       ^


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-06-23 11:13:44, Gzip enabled