I\'m getting the following warning
warning C4996: \'std::_Uninitialized_copy0\': Function call with parameters that may be unsafe - this call relies on the ca
First, I would like to say that I am quite fond of compiler warnings. I invoke gcc with -Wall -Wextra.
However, the MSVC warning C4996 mostly fires on completely valid code. The changes proposed in the warning text often seriously compromise the code portability, while they never substantially improve the code quality. Thus I regularly suppress this warning in my MSVC projects (Project properties->C++->Advanced->Disable specific warnings).
Check also this and that discussions.
This error is generated because the code the compiler produces is not thread-safe. This means that if you are using multi-threaded coding, some of your stream I/O can (and probably will) get lost because the internal I/O buffers are shared. The suggested substitute functions will "eliminate" this problem.