title: Reading exact columns of a text file and putting the values/text into a vector
body: <p>I'm building a code on which I have to read a text file with many types of data. Here is a part of the file:</p>
  
  <pre><code>1000000 923475248-18 Ramiro A. Xavier
  999999 923501748-58 Ramiro A. Wolski 
  999998 923517472-32 Ramiro Q. Wollinger 
  </code></pre>
  
  <p>(It has 1000000 lines)</p>
  
  <p>And after reading it, I have to select the kind of data I want to work with, and I have to sort it, alphabetically or in crescent/decrescent order in case of the numbers. </p>
  
  <p>I already have the code to sort it (Bubble Sort), but in my code, I have to type the data myself. So my question is: </p>
  
  <p>How do I read one specific column of this file and save it's content on an array?</p>
  
  <p>I'm working on this as a project, and I am not allowed to use C++ language or much complex structures such as ("cout &lt;&lt;, buf, aot, tmpline")</p>
  
  <p>I managed to read the file and print what's in it with this code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;conio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;time.h&gt;
  int main()
  {
      FILE *fp;
      char c;
  
      fp = fopen("list1000000.txt","r"); 
      if(!fp)
      {
          printf( "Error");
          exit(0);
      }
      while((c = getc(fp) ) != EOF) 
  
      printf("%c", c);
  
      getch(); 
      return 0;
      fclose(fp);
      getch();
      return 0;
  }
  </code></pre>
  
  <p>Thanks,
    Eduardo</p>