iam trying to store all the data in to a struct so i can change it later.
//this data is in file
abc 1 11 22
def 2 33
ghi 0 22 11 33
asd 2
i was planing on making a array of structs. so 1st line will have one struct.
2nd line will have 2nd struct.
struct node
{
char *alp;
int x;
int ar[]10;
};
int main()
{
int i = 0;
char *array[20];
struct node buff {NULL, 0, 0000000000};
while(read one line(LOOP) fscanf())
- array[i] = buff->alp = abc;
- array[i] = buff->x = 1;
- array[i] = buff->ar = 22;
i++;
}