23 static string charset =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
25 result.resize(length);
27 for (
int i = 0; i < length; i++)
28 result[i] = charset[rand() % charset.length()];
35 int r=(
int)round((
float)(rand()-RAND_MAX/2)*2.0/(
float)RAND_MAX*(
float)cnt);
39 int main(
int argc,
char *argv[]){
44 cout<<
"want to sort the following :"<<endl;
48 for (
int i=0;i<
cnt;i++){
56 bst.
sort(&linkList, &string::compare);
58 cout<<
"The result is :"<<endl;
60 for (
int i=1; i<=linkList.
getCount(); i++)
61 cout<<(*linkList.
next())<<
'\t';