| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
这样为什么会编译错误了??template<class T>
int cmp( const void *a, const void *b )
{
Point<T> *c = (Point<T> *)a ;
Point<T> *d = (Point<T> *)b ;
if( c->k - d->k > eps ) return 1 ;
else if( c->k - d->k < -1 * eps ) return -1 ;
else//斜率相等距离近的点在先
return c->x - d->x > 0 ? 1 : -1 ;
}
error C2664: 'qsort' : cannot convert parameter 4 from 'int (__cdecl *)(const void *,const void *)' to 'int (__cdecl *)(const void *,const void *)'
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator