title: Incrementing pointers for *char in a while loop
body: <p>Here is what I have:</p>
  
  <pre><code>char* input = new char [input_max]
  char* inputPtr = iput;
  </code></pre>
  
  <p>I want to use the inputPtr to traverse the input array. However I am not sure what will correctly check whether or not I have reached the end of the string:</p>
  
  <pre><code>while (*inputPtr++)
  {
      // Some code
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>while (*inputPtr != '\0')
  {
      inputPtr++;
      // Some code
  }
  </code></pre>
  
  <p>or a more elegant option?</p>