This entire code works, but im having trouble with the pointers (which i dont understand 100%) In the code im taking the integers and holding them into a buffer (an array) so that i may use the int as a string so i can format the string with commas ie ###,###,###. I am getting the "passing arg 1 of "InsertComma" from incompatible pointer type"

please help! and feel free to teach me the correct way to use pointers ;0

its the char comma[64] and function insertcomma function im having problem with

heres is the code:

////////////////////////////////////////////////////////////////////////

#include "windows.h"
#include "stdlib.h"
#include "stdio.h"

/* function prototype - appends commas to string */
char InsertComma(char comma[]); <------ problem

/* buffer to hold integers */
char comma[64] = {0}; <------ problem

int main()
{

int i;
unsigned char data[512];
DWORD dwBytesRead = 0;

HANDLE hFile = NULL;

hFile = CreateFile("\\\\.\\E:", /* drive to open */
GENERIC_READ, /* allows drive read */
FILE_SHARE_READ, /* shares read access */
NULL, /* Security Descriptor */
OPEN_EXISTING, /* declares creation */
FILE_ATTRIBUTE_READONLY, /* access is read only */
NULL); /* handle to template */

if(hFile != NULL)
{
/* read the boot */
if (!ReadFile(hFile, &data, 512, &dwBytesRead, NULL))
{
printf("Error in reading the specified drive!\n");
}
else
{
/* perform hexdump of boot information */
for (i = 0; i<100; i++)
printf("%d %X\n",i,data[i]);

/* closes the handle */
CloseHandle(hFile);

/* turn the data into usable information for output*/
int sb = *((int *)(data + 11)) & 0xFFFF;
int cs = *((int *)(data + 13)) & 0xFF;
int ns = *((int *)(data + 32)) & 0xFFFFFFFF;
int nh = *((int *)(data + 26)) & 0xFFFF;
int spf = *((int *)(data + 22)) & 0xFFFF;
int rdcn = *((int *)(data + 44)) & 0xFFFFFFFF;
int cncrd = *((int *)(data + 50)) & 0xFFFFFFFF;
int tnob = *((int *)(data + 12)) & 0xFFFFFFFF; /* if anyone knows how to compute the total amount on the drive, pls let me know ;] */

/* prints necessary output to screen */
printf("\n ---- Disk Information ----");

/* sprintf converts integer to string, holds data in (char data[]) */
sprintf(comma, "%d", sb);
printf("\nSector size (in bytes): "); InsertComma(&comma); <------ problem

sprintf(comma, "%d", cs);
printf("\nCluster size (in sectors): "); InsertComma(&comma); <------ problem

sprintf(comma, "%d", ns);
printf("\nTotal number of sectors: "); InsertComma(&comma); <------ problem

sprintf(comma, "%d", nh);
printf("\nTotal number of heads: "); InsertComma(&comma); <------ problem

sprintf(comma, "%d", spf);
printf("\nSectors per FAT: "); InsertComma(&comma); <------ problem

sprintf(comma, "%d", rdcn);
printf("\nRoot directory cluster number: "); InsertComma(&comma); <------ problem

sprintf(comma, "%d", cncrd);
printf("\nCluster number of the copy of the root directory: "); InsertComma(&comma);

sprintf(comma, "%d", tnob);
printf("\nTotal disk size in bytes: "); InsertComma(&comma);

}
}
}

char InsertComma(char comma[]) <------ problem
{

char *instring = comma; <------ problem
char outstring[64];
char *ptr, *optr;
int i, length, commas;

/* move ptr to end of instring */
for ( ptr = instring; *ptr; ptr++ );

/*calculate offset with commas*/
length = ptr - instring;
commas = ( length - 1 ) / 3;
optr = outstring + length + commas;

/*copy instring into outstring backwards inserting commas */
*optr-- = *ptr--;
for ( i = 1; ptr >= instring; i++ )
{
*optr-- = *ptr--;
if ( ( i % 3 ) == 0 )
*optr-- = ',';
}

/* show the result */
printf ( "%s", outstring );
}