If I may elaborate on this problem, most of the string handling routines (strcpy, strcat, sprintf...etc.) have a more 'managed' alternative that Microsoft encourages programmers to use.  These have the '_s' after them (strcpy_s, strcat_s, sprintf_s), and contain an additional argument that specifies the length of the character array that defines the string.  This prevents the code from buffer overruns because it checks the limits of the string length.
 
The alternative code is still ANSI standard, so you may or may not decide to make this change.  The compile flags suggested by Olaf do eliminate the 'deprecated' warnings in Visual Studio.
 
Drew

 
On 1/23/06, Olaf Flebbe <[EMAIL PROTECTED]> wrote:
Hi,

there was a question on how to reduce compiler warnings with Visual C 8:

In order to reduce warnings with Visual Studio 2005 use the following defines

_CRT_SECURE_NO_DEPRECATE
_CONST_CORRECT_OVERLOADS
NOMINMAX

NOMINMAX is not necessary, but can be handy.

Then only a few Warnings are still there, which we can ignore safely.

Cheers
  Olaf

Reply via email to