CC++C++11C++14C++17C++20Learn C++Syntax

Why Was The Gets Function Removed In C++14?

Modern C++ has a lot of useful functions coming from C. One of them was the gets() function that we use to get string inputs and that we were able to use in C++11 or earlier. In C++14, the gets function was removed, while fgets or other input functions remain there. If you have older C++ code that uses the gets() functions your C++14 version compiler will not compile it. Why was the gets function…
Read more