Visual Studio Warning C4996
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.