Safe Libraries: C++ Standard Library
Several enhancements have been made to the libraries that ship with Microsoft C++, including the C++ Standard Library, to make them more secure.
Several methods in the C++ Standard Library have been identified as potentially unsafe because they could lead to a buffer overrun or other code defect. The use of these methods is discouraged, and new, more secure methods have been created to replace them. These new methods all end in
The following table lists the C++ Standard Library methods that are potentially unsafe, as well as their safer equivalent:
|Potentially unsafe method||Safer equivalent|
If you call any one of the potentially unsafe methods above, or if you use iterators incorrectly, the compiler will generate Compiler Warning (level 3) C4996. For information on how to disable these warnings, see _SCL_SECURE_NO_WARNINGS.
In This Section