Is gets() officially deprecated?
问题 Based on the most recent draft of C++11, C++ refers to ISO/IEC 9899:1999/Cor.3:2007(E) for the definitions of the C library functions (per §1.2[intro.refs]/1). Based on the most recent draft of C99 TC3, The gets function is obsolescent, and is deprecated. (per §7.26.9/2) Can I safely say that gets() is deprecated in both C and C++? 回答1: Does it matter? The only way you can ever use gets is if stdin is known to be attached to a file whose contents you have full control over. This condition is