VisualStudio unsafe warning

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/sandalphon4869/article/details/100584333

When you use scanf (), sprintf (), and would suggest that you use scanf_s (), sprintf_s ().

You can choose to change to sprintf_s (), or it is not being given.

Add this macro to ok.

#define _CRT_SECURE_NO_WARNINGS

such as:

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main() {
	printf("hello\n");
	return 0;
}

Guess you like

Origin blog.csdn.net/sandalphon4869/article/details/100584333