int pole_flags[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int pole_good[15] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
//
//becomes
//
int* pole_flags; //delare array name
int* pole_good; //delare array name
void poles_startup()
{
pole_flags = (int*)malloc((long)sizeof(int)*15); //allocate space for 15 int's
memset(pole_flags, 0, (long)sizeof(int)*15); //set data to all zeros
pole_good = (int*)malloc((long)sizeof(int)*15); //allocate space for 15 int's
memset(pole_good, 0, (long)sizeof(int)*15); //set data to all zeros
}
//
// Theoretically this will work too, but Ive never tried this style.
//
int* pole_flags = (int*)malloc((long)sizeof(int)*15); //allocate space for 15 int's
int* pole_good = (int*)malloc((long)sizeof(int)*15); //allocate space for 15 int's
void poles_startup()
{
memset(pole_flags, 0, (long)sizeof(int)*15); //set data to all zeros
memset(pole_good, 0, (long)sizeof(int)*15); //set data to all zeros
}