For beginners in C language courses, they will download VS2010, VS2012, and VS2019, but there will always be a problem that the scanf function will report an error.
It is not a warning, but a direct error, as follows:
So how to solve this problem? Various solutions can be found on the Internet, such as:
this can also be solved, but every time you create a new project, you have to re-enter it, which is more troublesome, so today I will teach you a one-time solution to the problem, as follows:
1. Copy the error below One sentence is wrong: _CRT_SECURE_NO_WARNINGS
2. Find the location of your VS software, find the VC folder
3. Find vcprojectitems, and then find newc++file
4. Right-click to edit it, and write the error you just copied.
5. If the following error message appears, the permissions are not enough, then you should use high permissions to edit
6. We need to download a Notepad++ to edit it, this we can save it as an administrator
7. After editing, we create a new empty project, you can see that there is this sentence in the first line of the project by default. We don’t need to set other statements, and we don’t have to worry about reporting errors.