title: Read in text file - 1 character at a time. using C
body: <p>I'm trying to read in a text file line by line and process each character individually.</p>
  
  <p>For example, one line in my text file might look like this:
  <code>ABC XXXX XXXXXXXX ABC</code></p>
  
  <p>There will always be a different amount of spaces in the line. But the same number of characters (including spaces).</p>
  
  <p>This is what I have so far...</p>
  
  <pre><code>char currentLine[100];
  fgets(currentLine, 22, inputFile);
  </code></pre>
  
  <p>I'm then trying to iterate through the currentLine Array and work with each character...</p>
  
  <pre><code>for (j = 0; j&lt;22; j++) {
      if (&amp;currentLine[j] == 'x') {
          // character is an x... do something
       }
  }
  </code></pre>
  
  <p>Can anyone help me with how I should be doing this?</p>
  
  <p>As you can probably tell - I've just started using C.</p>