Passing a file to a structure

Hi, I need to pass a .txt file to a structure LIST. I also need to pass a .txt file to a pointer *point of a structure. My .txt files are arrays of two columns. The first column corresponds to the node and the second column corresponds to the depth of structure ELEMENT. How can I do this?
Below is the code with the structures.

1
2
3
4
5
6
7
8
9
10
11
12
13

typedef struct list
{
  int *point;   
  int size;  
} LIST;

typedef struct element
{
  int node;
  int depth;
} ELEMENT;



Diogo
Last edited on
Topic archived. No new replies allowed.