草庐IT

coderbyte

全部标签

c++ - 网站 coderbyte 上的 'gets(stdin)' 是怎么回事?

Coderbyte是一个在线编码挑战网站(我是在2分钟前发现的)。ThefirstC++challenge看到你有一个需要修改的C++框架:#include#includeusingnamespacestd;intFirstFactorial(intnum){//Codegoesherereturnnum;}intmain(){//Keepthisfunctioncallherecout如果你对C++不太熟悉,那么*首先映入你眼帘的是:intFirstFactorial(intnum);cout所以,好的,代码调用gets自C++11以来已弃用,自C++14以来已被删除,这本身就是不好