I need to read in some data from a csv file, and store each component into a struct.
The csv file has the following headers: name, last name, phone number, age
The csv file has an unknown number of records, and I want to create a dynamic array of pointers to structs to store this data.
I started with this:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv){
typedef struct{
char** name;
char** last_name;
int * number;
int* age}person_t;
person_t **storage;
}
But now I am absolutely stuck and have no idea how to proceed. Please help!