Hi all, I was messing with a quicksort but I cannot understand the error that I am getting
If the code is like the first it works fine but if it is like the second I get an error saying that there is a missing ; before type. the only diffeence in the two is the line "void quickSort(start1, end1);"
C:\Documents and Settings\asm\My Documents\QSORT.C(27) : error C2143: syntax error : missing ';' before 'type'
second with error
Could anybody shed some light on this please
Thx Tony
If the code is like the first it works fine but if it is like the second I get an error saying that there is a missing ; before type. the only diffeence in the two is the line "void quickSort(start1, end1);"
C:\Documents and Settings\asm\My Documents\QSORT.C(27) : error C2143: syntax error : missing ';' before 'type'
Code:
int start1=0, end1=8, i=0, temp;
void quickSort(start1, end1);
for (i=0; i<=8; i++)
{
temp = arrayNumbers[i];
printf("%d\n",temp);
}
i = 0;
for (i=0; i<=8; i++)
{
temp = arrayNumbers[i];
printf("%d\n",temp);
}
return 0;
}
second with error
Code:
void main(void)
{
int start1=0, end1=8, i=0, temp;
for (i=0; i<=8; i++)
{
temp = arrayNumbers[i];
printf("%d\n",temp);
}
i = 0;
void quickSort(start1, end1);
for (i=0; i<=8; i++)
{
temp = arrayNumbers[i];
printf("%d\n",temp);
}
return 0;
Thx Tony