title: C: Read a file and store them into a data structure
body: <p>So I have a .txt doc with the following information (it can be multiple lines, but in this case it is 3 lines)</p>
  
  <pre><code>Jane Smith    123 lala land    123-222-1231
  Bob Fall    123 blue jay st    812-923-1111
  Sally White    1 rose ave.    +1-231-2318
  </code></pre>
  
  <p>I want to create a 'read' function that reads the file, then a 'write' function that writes it into a data structure.</p>
  
  <p>So far , I have this:</p>
  
  <pre><code>void read()
  {
      FILE *file;
      file = fopen("fileName", "r");
      write(file);
  }
  
  void write(FILE *file)
   {
  
   }
  </code></pre>
  
  <p>I was wondering how I would store each line into a data structure since C does not support vectors. I want to be able to then create a print function where it can print:</p>
  
  <pre><code>  1 //line #1 info here
    2 //etc
    3 //etc
  </code></pre>