What is "stdafx.h" for in VS.Net?

D

Darren

I just want do some console C++ programs. Do I still need this wield
header"stdafx.h"? Thanks
 
G

Gianni Mariani

Darren said:
I just want do some console C++ programs. Do I still need this wield
header"stdafx.h"? Thanks

The C++ standard knows nothing about stdafx.h. This is a vendor
specific extension you'll need to talk to vendor based news groups about.

I usually turn off "pre-compiled headers" and remove the include for
stdafx.h as they have caused more trouble than they are worth. (IMHO).

Standard C++ knows nothing about "Console" applications, they are all
the same.

If it is a standard C++ compiler, you don't need to include anything.


e.g.
 
R

Richard Cavell

I just want do some console C++ programs. Do I still need this wield
header"stdafx.h"? Thanks

It shouldn't make a difference whether you include it or not. It's
Microsoft's way of precompiling headers - that is, it's a way of
speeding up compilation. Just leave it there and ignore it.
 
D

DHOLLINGSWORTH2

Darren said:
I just want do some console C++ programs. Do I still need this wield
header"stdafx.h"? Thanks

STDAFX.H , is, I beleive - becuase i never encountered it until, a MicroSoft
thing.
You get it automatically when you create a new project, just cut the info
out and drop in your own header file. You are not required to use this file,
"stdafx.h"
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top