Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

return strcmp((char*)a,(char*)b); 这样最好, 要求用字符串数组, char list[100000][8]; 要这样声明

Posted by sunmoonstar at 2006-07-26 20:27:27 on Problem 2872
In Reply To:由一个qsort引发的OLE,请高手解答 Posted by:DancingBlue at 2006-07-26 19:27:59
> char* list[100000];
> int cmp(const void * a,const void * b){
> 	return strcmp((char*)(&a),(char*)(&b));
> }
> qsort(list,n,sizeof(list[0]),cmp);
> 
> 这样用应该是没错的吧,但是...结果就是OLE,请高手给予指点,谢谢

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator