title: Data from file not being read in linux server C
body: <p>I have several functions that read from .txt files and populate 2D arrays based on the contained information. The function I'm currently working on is as follows:</p>
  
  <pre><code>char** fillCountyList(char inputFile[])
  {
      char **countyList = NULL;
  
      FILE *input;
      input = fopen(inputFile, "r");
      checkFileOpen(input); //a separate function
  
      countyList = malloc(COUNTIES_IN_SD * sizeof(char*));
      for (int iii = 0; iii &lt; COUNTIES_IN_SD; ++iii)
      {
          countyList[iii] = malloc(COUNTY_LENGTH * sizeof(char));
          fgets(countyList[iii], COUNTY_LENGTH, input);
      }
      return countyList;
  }
  </code></pre>
  
  <p>This compiles fine, and when I run it on Visual Studio (15.6.2), it reads the data and creates the array. When I run it on a remote linux server, it doesn't read any data at all.</p>
  
  <p>The file opens fine, but none of the data is read.</p>
  
  <p>I also realize that since both COUNTIES_IN_SD and COUNTY_LENGTH are macros, I could simply create the array statically, but I need to do similar things with other files that I have to use dynamic memory, and this was the simplest example to share.</p>
  
  <p>Thanks in advance.</p>