|
[ ... ]
What must I do, in this [New Item] window, to be able to select a .c source file Currently the only method i've found is either to create a .c file outside the IDE and then add it to the project, or create a header-file and save it as *.c file.
There has to be a better way.
|
|
Use the C++ item template. But name the file with a .c extension. VC++ will honor your wishes.
Also, for plain Standard C, make sure that you are using the General VC++ Project type, with Empty project template.
If you want to avoid using Microsoft extensions, right-click your .c file and select Properties | Configuration Properties | C/C++ | Language and change "Disable Language Extensions" from "no" to "yes".
Although some will complain that Visual C++ is not ANSI/ISO C99 compliant (Microsoft chose a path that is closer to alignment with ISO C++ and having a C++-compatible C Language subset), it is great for making "Clean C" programs and you should find it enjoyable to use that way.
If you want to build code that is more integrated with the Windows Platform (e.g., Dynamic Link Libraries, WinApps, etc.) you'll need to enable extensions again. But you can decide how to do that, and best isolate the platform dependencies, later on.
- Dennis
|