gets()の例
sample.c
#include <stdio.h>
#include <stdlib.h>
int main()
{
char buf[20];
printf(">");
gets(buf);
...
}
以下、引用: C/C++ セキュアコーディング 第2版 by Robert C. Seacordら
gets()はC99では使用が推奨されておらず、C11からは削除されている。
More than 5 years have passed since last update.
gets()の例
#include <stdio.h>
#include <stdlib.h>
int main()
{
char buf[20];
printf(">");
gets(buf);
...
}
以下、引用: C/C++ セキュアコーディング 第2版 by Robert C. Seacordら
gets()はC99では使用が推奨されておらず、C11からは削除されている。
Register as a new user and use Qiita more conveniently