vs2017 community
win10
code:
#include <stdio.h>
int main() {
int a, b;
scanf("%d%d", &a, &b);
printf("%d\n", a + b);
return 0;
}
错误:
C4996 ‘scanf’: This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
Workaround 1:
scanf -> scanf_s
Workaround 2:
_CRT_SECURE_NO_WARNINGS