Error C4996: 'scanf': This function or variable may be unsafe - C (СИ)
Формулировка задачи:
error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WAR
Листинг программы
- #include "stdafx.h"
- #include "conio.h"
- #include "math.h"
- int _tmain(int argc, _TCHAR* argv[])
- {
- float const g = 9.8f;
- float T;
- int S;
- printf("enter S:");
- scanf("%d", &S);
- T = sqrt(S * 2 / g);
- printf("T=%f/n", T);
- getch();
- return 0;
- }
Решение задачи: «Error C4996: 'scanf': This function or variable may be unsafe»
textual
Листинг программы
- #define _CRT_SECURE_NO_WARNINGS
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д