Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is gets() officially deprecated? [duplicate]

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++?

like image 481
Cubbi Avatar asked Sep 14 '11 22:09

Cubbi


1 Answers

Deprecated means you shouldn't use it and it might be removed in the future. Since both standards say it is deprecated, that means it is deprecated, officially.

like image 199
David Nehme Avatar answered Oct 23 '22 13:10

David Nehme