Hi i'm getting an error
CODE :
ERROR: E2356 TEXTSORT.C "TYPE MISMATCH IN REDECLARATION OF 'SWAP'
and i am exhausted trying to fix it...if you could help me please i would appreciate it.
void sort(char* string_array[], int length)
{
int i;
int exchange_done;
do
{
exchange_done = 0;
for (i = 1; i < length; i++)
{
if (strcmp(string_array[i], string_array[i-1]) < 0)
{
swap(&string_array[i], &string_array[i-1]);
exchange_done = 1;
}
}
} while (exchange_done);
}
void swap (char* pStr1, char* pStr2)
{
char temp;
temp = *pStr1;
*pStr1 = *pStr2;
*pStr2 = temp;
}