Nvm I got it to work so far...I will probably make another post if I run into the struct implementation
This assignment is so abstract and poorly explained I really appreciate you guys!
Thanks
Here's what I did:
Code
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void getData(float **);
int main() {
float* array1[20];
int i;
for(i = 0; i < 20; i++){
array1[i] = malloc(sizeof(float));
}
float **arrayP;
arrayP = array1;
getData(arrayP);
return 0;
}
void getData(float **arrayPF) {
int x;
float check;
FILE *fp;
fp = fopen("FloatNums.txt", "r");
do {
fscanf(fp, "%f", arrayPF[0]);
printf("%.2f\n", *arrayPF[0]);
}while ((x = fgetc(fp)) != EOF);
fclose(fp);
}
This post was edited by Nom_Nomz on Dec 8 2012 11:27pm