title: using strstr() function is breaking
body: <p>I am using <code>strstr()</code> function but I am getting the crash.</p>
  
  <p>This part of code is crashing with error "<strong>Access violation reading location 0x0000006c.</strong>"
   <code>strstr(p_czCharactersToDelete, (const char*)p_czInputString[index]))</code> </p>
  
  <p>Here is the complete code...</p>
  
  <pre><code>#include "stdafx.h"    
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  void delchar(char* p_czInputString, const char* p_czCharactersToDelete)
  {
      for (size_t index = 0; index &lt; strlen(p_czInputString); ++index)
      {
          if(NULL != strstr(p_czCharactersToDelete, (const char*)p_czInputString[index]))
          {
              printf_s("%c",p_czInputString[index]);
  
          }
      }
  }
  int main(int argc, char* argv[])
  {
      char c[32];
      strncpy_s(c, "life of pie", 32); 
      delchar(c, "def");
  
      // will output 'li o pi'
      std::cout &lt;&lt; c &lt;&lt; std::endl;
  }
  </code></pre>