#include<stdio.h>
int main() {
int n;
scanf("%d",&n);
printf("%d",n);
return 0;
}
I don't think there's a problem with the code, but it keeps printing.
Severity code descriptionProject file line display error status
This function or variable may be unsafe.
Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. S
ee online help for details.
If you use scanf_s
?, the output window will appear, but the value of 15 should appear, but nothing will appear
Help me, gentlemen.
C4996 'scanf': This function or variable may be unsafe.
Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. S
ee online help for details.
Google translator
C4996 'scanf': This function or variable may not be safe.
We recommend using scanf_s instead. To disable support disruption
Use _CRT_SECURE_NO_WARNINGS. NS
For more information, see Online Help.
If you want to use scanf, please define #define_CRT_SECURE_NO_WARNINGS
https://docs.microsoft.com/en-US/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-160
scanf_s requires one more parameter, unlike scanf.
Unlike scanf and wscanf, scanf_s and wscanf_s require you to specify
buffer sizes for some parameters.
© 2024 OneMinuteCode. All rights reserved.