title: strtok_s security debugging warnings solving
body: <p>I have a piece of code which has been complied by Dev C++ correctly. When I tried to execute it using VS2012 express I faced this warning ''warning C4996: '': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details''</p>
  
  <p>I tried to disable security warnings, but I found _CRT_SECURE_NO_WARNINGS option is not available in my VS express. so I had to modify my code to use strtok_s instead of strtok to avoid this warning. However, even the code executes to the end without any errors, something went wrong that the results do not appear. obviously no reading files occur. This is the previous code which worked well on Dev C++</p>
  
  <pre><code>const char* token[MAX_TOKENS_PER_LINE] = {}; // initialize to 0
      // parse the line
      token[0] = strtok(buf, DELIMITER); // first token
      if (token[0]) // zero if line is blank
      {
        for (n = 1; n &lt; MAX_TOKENS_PER_LINE; n++)
        {
      token[n] = strtok(0, DELIMITER); // subsequent tokens
          if (!token[n]) break; // no more tokens
  </code></pre>
  
  <p>and this is what I tried to execute using VS2012 express</p>
  
  <pre><code>const char* token[MAX_TOKENS_PER_LINE] = {}; // initialize to 0
      char* next_token[MAX_TOKENS_PER_LINE] = {}; // initialize to 0
      //char* next_token;
      // parse the line
      token[0] = strtok_s(buf, DELIMITER, &amp;next_token[0]); // first token
      if (token[0]) // zero if line is blank
      {
        for (n = 1; n &lt; MAX_TOKENS_PER_LINE; n++)
        {
      token[n] = strtok_s(0, DELIMITER, &amp;next_token[n]); // subsequent tokens
          if (!token[n]) break; // no more tokens
  </code></pre>
  
  <p>What is wrong with the second code?</p>