title: How do I iterate through a pointer to a char array in C?
body: <p>I'm new to C, and I'm having a bit of trouble figuring out the exact way to do this.</p>
  
  <p>I need to iterate through a string and store each letter one at a time in order to decrypt it.</p>
  
  <p>So what I'm doing is: </p>
  
  <p>#1. Creating a place to store the string:</p>
  
  <pre><code>char toDecrypt[] = node-&gt;string;
  </code></pre>
  
  <p>#2. Starting the for loop:</p>
  
  <pre><code>for(int m=0; m&lt; strlen(toDecrypt); ++m)
  </code></pre>
  
  <p>#3. Storing the char (to be decrypted later):</p>
  
  <pre><code>char i = toDecrypt[m];
  </code></pre>
  
  <p>So is the above valid, or should I be using a different notation to properly store the char?</p>
  
  <p>EDIT:</p>
  
  <p>Ok, I think I have that cleared up, so I just have one follow up question.</p>
  
  <p>How do I check to see if a char is a "\"? My check doesn't seem to be working.</p>
  
  <p>When I put </p>
  
  <pre><code>toDecrypt[m] != '\';
  </code></pre>
  
  <p>into an if statement, it doesn't work...</p>