title: Why can't I use strerror?
body: <p>I'm porting some code to Windows, and the Microsoft compiler (Visual C++ 8) is telling me that <code>strerror()</code> is unsafe.</p>
  
  <p>Putting aside the annoyance factor in all the safe string stuff from Microsoft, I can actually see that some of the deprecated functions are dangerous. But I can't understand what could be wrong with <code>strerror()</code>. It takes a code (<code>int</code>), and returns the corresponding string, or the empty string if that code is not known.</p>
  
  <p>Where is the danger?</p>
  
  <p>Is there a good alternative in C?</p>
  
  <p>Is there a good alternative in C++?</p>
  
  <p>[edit]</p>
  
  <p>Having had some good answers, and now understanding that some implementations may be crazy enough to actually write to a common shared buffer - unsafe to reentrancy within a single-thread, never mind between threads! - my question stops being "Why can't I use it, and what are the alternatives?" to "Are there any decent, succinct alternatives in C and/or C++?"</p>
  
  <p>Thanks in advance</p>