That's it, just create your project, add a new source and name it whatever.c (note the .c extension), the IDE (is supposed to) recognize it and compile it as a C file.
By the way, posting the compile log (the error messages you got) will make it easier to find out the problem.
Best wishes,
José Jorge (GeoMX).
C Programming and Visual Studio 2005 Questions
I usually do two things to compile c project in VS 2005:
1. Create and save files with .c extension
2. Change the project settings: Configuration settings -> c/c++ -> Advanced -> Compile As. The default of this setting is "Compile as C++ code", change it to "Compile as C code".
1. Create and save files with .c extension
2. Change the project settings: Configuration settings -> c/c++ -> Advanced -> Compile As. The default of this setting is "Compile as C++ code", change it to "Compile as C code".
Quote: 2.) When creating a console application in VS, it automatically makes it so the message "press any key to continue" is displayed when your program stops executing (so long as you don't make an empty project). If you want to do it yourself, just include a scanf() that does nothing.
instead of a bogus instruction, the following does the job:
system ( "PAUSE" );
before the return statement.
instead of a bogus instruction, the following does the job:
system ( "PAUSE" );
before the return statement.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement