sorry about that. out is the file descriptor and arr is the array ptr being passed in.
Code:
void theoutput(int* arr,int out)
{
int x;
char convert[50]; //buffer to hold int
for(x = 0; x < ARRAY_SIZE; x++)
{
sprintf (convert, "%d", arr[x]);
write(out, &convert, sizeof(&convert));
write(out, " : ", 3);
}
write(out,"\n",1);
}
the only other changes i made to this code are in the write function:
write(out, &convert, sizeof(&convert));
changed to
write(out, convert, sizeof(&convert));
the program compiles correctly with both versions, but still with the "H" being appended to numbers that are below 3 digits.