Creating Pure C projects in Visual Studio 2017 Page 1 Create a new project then choose Visual C++, then choose Empty Project.
You¡¯ll get an empty project! Now you need to add the source code file. Right click on the project icon in the Solution explorer, and then choose Add, then New Item.
Creating Pure C projects in Visual Studio 2017 Page 2 You will get a file named Source.CPP. Delete the PP so the file extension is .C, and then hit Add.
Add your code (all of it) including the #include statement as shown below.
In the example below, using scanf will trigger an error. This is purely a Microsoft generated error and has nothing to do with C. There are two ways to suppress that error:
Creating Pure C projects in Visual Studio 2017 Page 3 1. R Click the Project file in the Solution Explorer windows then click Properties then …
Expand C++/C and click General. On the right side, next to SDL checks, click the dropdown list arrow and select No as shown below. This will suppress the security alerts caused by C++.
2. The other option to not get an error when using scanf, is to suppress that warning using code. Type the following line before any directive statement:
#define _CRT_SECURE_NO_WARNINGS