Why can I use gets() in gcc -std=c11?

前端 未结 3 1798
余生分开走
余生分开走 2021-01-02 00:43

The gets() function has been removed from the C language. No such function exists in the standard.

Yet I compile the following code:

#in         


        
3条回答
  •  耶瑟儿~
    2021-01-02 01:05

    The key line of your code is:

    #include 
    

    Did you update your system's C library and headers? They're also part of the C implementation, along with the compiler.

提交回复
热议问题