I want to compile a simple c program.
Not c++ Not even Windows.
Just a simple program to run in a DOS window.
In vs2005 what type of project to I use.
I can't get started. I tried a couple of types but the wizard always
produces more then I need.
Thanks
What is the #include "stdafx.h" that keeps showing up for?
with visual studio 2005, you can have to select a programming language in
either C#, VB.NET, C++ or J#.
if you got a file StdAfx.h, you selected a C++ project. StdAfx.h is the
default header file that will be compiled into a precompiled header for you.
the intention is that you put all the windows and library header in here if
they are needed in your project. they are compiled only once, instead of
each time you compile a cpp file. in your different cpp files you have to
include StdAfx.h.
this saves you a lot of compilation time.
StdAfx .cpp and .h are generated by default, and there is no harm in using
them.
you normally have console.cpp (or whatever your project name is) StdAxf.cpp,
StdAxf.h.
you can throw away the StdAfx files if you really want to.
in that case you also need to change the project properties to not use
precompiled headers
The simplest programs you can write are console applications. if you like
the C syntax you can choose between C# console applications and C++ console
applications.
with C# you always have to use .NET. with C++ you can choose to either use
the .NET framework or compile a native application.
--
Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"