#include
#include
main()
{
char buffer[256];
printf("Enter your name and press \n");
gets(buffer);
printf("\n Your name has %d character and spaces",strlen(buffer));
return 0;
}
보다시피 아주 간단한 소스입니다.
그런데,, 컴파일 할때 에러 납니다.
에러 무시하고 실행하면 결과는 잘 나오는데....
에러 메시지가 무슨 뜻인지 알고 싶습니다.
/tmp/ccuKOlwz.o In function `main'
/tmp/ccuKOlwz.o(.text+0x24) the `gets' function is dangerous and should not be
used.
gets() 가 위험하다??
이유가