Hello
I want to use the modf() fucntion to split the integral en fractional parts.
But i dont know how i need to give the second parameter to the function.
Code:
int split(struct getallen *list, int **n, float **frac)
{
int number, i;
struct getallen *kopy;
kopy = list;
while(kopy != NULL)
{
number++;
kopy = kopy -> next;
}
*n = (int *) malloc (number * sizeof(int));
*frac = (float *) malloc (number * sizeof(float));
kopy = list;
for (i = 0; i < number; i++)
{
*frac[i] = modf(kopy -> getal, &n[i]);
}
return 0;
}