I need a fast sorting routine, written in MS C / C++ (under Visual Studio 6), that will: 1. Accept a string array from Visual Basic 6. Each string element consists of multiple sub strings of variable length, separated by a delimiter. The delimiter in the input array can by either a space or a semi-column (";"), but not both. The number of sub strings in each element will be fixed for any input array and will be less than 64. The number of characters in each sub-string will be less than 64. The number of elements ("lines") in the array will be less than 32,000. The sub-strings may contain any of the ANSI 33-127 char codes (except space or semi-column). 2. Sort the array using QuickSort, HeapSort or RadixSort The sorting may be done on any sub-string of string element, the location thereof will be passed from the calling program to the sorting module. 3. The sorted array elements will be returned to the calling VB6 program in an output array with the element structure (i.e. "lines" containing sub-strings) similar to the input array. The content of each array element will stay intact (i.e. the content of the "lines" of the input array will stay intact - only their relative location will change - according to the sort criterion. Example: Input array (provided by the VB program): arrInput(1) = "clk M_Addr0 C1 UNI012 11 11 T CONN5X2-100mil" arrInput(2) = "RGMII0_TX102 R1741.1 C10 UNI011 22 23 56 DIP8\SO(NC)" arrInput(3) = "LED0/ACT /RSTPP1 C2 SN_DQ16_7075735 /RST_LED_CPLD_N AMS1505CMA-TO263 0805 N1994066" Calling Statement will be similar to: Call Sort(SortMethod, LocationOfSubStringKey, NumberOfElements, NumberOfSubStringsInAnElement, DelimiterType, DataArray) Output array (provided to the VB program): (assuming that we RadixSort on the third sub-string) arrOutput(1) = "clk M_Addr0 C1 UNI012 11 11 T CONN5X2-100mil" arrOutput(2) = "LED0/ACT /RSTPP1 C2 SN_DQ16_7075735 /RST_LED_CPLD_N AMS1505CMA-TO263 0805 N1994066" arrOutput(3) = "RGMII0_TX102 R1741.1 C10 UNI011 22 23 56 DIP8\SO(NC)"
Notes: 1. The sort routine should be packaged as a DLL/OCX without any 3rd-party elements. Deliverables: 1. Complete and fully-functional working program(s) in executable (DLL/OCX) form as well as complete source code of all work [url removed, login to view] should be with full and detailed comments. A sample VB 6 program that will demo the requested operations by calling the compiled DLL/OCX, transferring unsorted array and receiving back a sorted array. 2. Zipped file of the Visual Studio project directory, to be compiled on the buyer's machine. 3. Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc.) 4. Code must be fully debugged, robust and of commercial quality. 5. Bonus will be given for quality of work, doc/comments and speed of sorting.