I'm trying to use SysInsertionSort to sort a list of strings and I'm not
having any luck.
Can anyone offer any hints?

I'm trying to do *something like* the following:

static int
stringCompareFunc(VoidPtr objA, VoidPtr objB, Long other)
{
        return StrCompare((CharPtr) objA, (CharPtr) objB);
}

void
anotherFunc(void)
{
        char **strings;

        strings = (char **) MemPtrNew(sizeof(char *) * 25);
        strings[0] = (char *) MemPtrNew(25);
        StrCopy(strings[0], "String0");
        strings[1] = (char *) MemPtrNew(25);
        StrCopy(strings[1], "String1");
        etc...

        SysInsertionSort(strings, 5, sizeof(char *), stringCompareFunc, 0);
}

Thanks,
Craig

Craig Setera
AS/400 Enterprise Java Development
IBM Rochester
[EMAIL PROTECTED]
(507) 253-3387 - Tie: 553-3387


Reply via email to