title: Reading in an array for maze file in C with an uneven size of cube and extra characters
body: <p>I'm trying to figure out how to properly read in and store a maze  from a .txt document in C. The max size of this maze will be 40x40 "cubes". After reading it in, I will be needing to solve it, by placing the path from the left hand corner to bottom right with a *. I'm used to using 2D Arrays, but this problem keeps tripping me up as I don't understand how to keep track of the rows and cols if they are not exactly even, or how I would even accurately print a * in the middle of each "cube" after I have solved it. I've read other examples of mazes that are composed of 1s and 0s, or all even # for the walls, which makes it easy to read in and keep track of, but not input like this. There will be other mazes on the same text file that I will need to read in after solving the first maze that will be separated by a double space. Below is an example of one of the mazes :</p>
  
  <pre><code>+---+---+---+---+---+  
  |       |           |  
  +---+   +   +   +   +  
  |   |   |   |   |   |  
  +   +   +   +   +---+  
  |   |   |   |       |  
  +   +   +   +---+   +  
  |       |   |       |  
  +   +---+---+   +   +  
  |               |   |  
  +---+---+---+---+---+ 
  </code></pre>
  
  <p>Here is some of my code I am making so far to error check and read in characters. In it, I am attempting to initialize an array of 120x120, read in the current char, and convert these characters to either a -1 or 0 to correspond to a wall or empty space. :</p>
  
  <pre><code>/* Read in a grid as parameter of max 120x120 to account for '+' and'-' */
  int readLine(int grid2D[120][120])
  {
      int row = 0;
      int col = 0;
  
      int isNewLine = TRUE;
  
      /* Loop through while getchar does not equal EOF */
      while ((c = getchar()) != EOF)
      {
  
          /* Check for foreign characters, return FALSE if found */
          if ((c != '+') || (c != '-') || (c != '|') || (c != ' '))
          {
              /* If c = \n , avoid tripping error, and do nothing */
              if(c == '\n'){}
              else
                errorFree = FALSE;
          }
  
          /* If character is a '+' '-' or '|', it is a wall, set to -1 to 
          use int's for wall tracking */
          else if (row%2 == 0)
          {
             if(c == '|')
             {
                grid2D[row][col] = -1;
                col++;
             }
          }
          else if((c == '+') || (c == '-'))
          {
             grid2D[row][col] = -1;
             col++;
          }
          else
          {
              if(c == '\n')
              {
                 col = 0;
                 row++;
              }
          }
  
      isNewLine = TRUE;
  
      return isNewLine;
  }
  </code></pre>
  
  <p>Any guidance would be greatly appreciated, I am not sure if the approach I am doing is correct. I believe I am currently error checking correctly, however I am struggling to understand how I should be keep track of the each "cube" since the chars for each "cube" are not even, they are more so dimensioned as 5x1 cubes (a <code>+---+</code> for one side and a <code>|</code> for the other)</p>