|
-
Jan 28th, 2003, 04:13 AM
#1
Thread Starter
PowerPoster
Basic question
what is the usage of this header file stdafx.h? As it come along with the project created with the VS wizards.
-
Jan 28th, 2003, 04:32 AM
#2
Hyperactive Member
It contains the most common used headers. (Why don't you open that header and read its comments?)
If you are adding your own CPP to your own VC project and you have troubles compiling(assuming your hand coded cpp uses MFC), then include stdafx.h at the very top of source before any headers.
-
Jan 28th, 2003, 11:55 AM
#3
Stuck in the 80s
I always remove all the stdafx junk if it exists in a project. I've never found a use for it, personally.
-
Jan 28th, 2003, 02:36 PM
#4
Hyperactive Member
If it is a console project, you may remove it. But for other project types it is a no-no.
-
Jan 28th, 2003, 02:40 PM
#5
Stuck in the 80s
Originally posted by transcendental
If it is a console project, you may remove it. But for other project types it is a no-no.
Like what other types? I never have it in a WIN32 application either. Those are the only two types of projects I've done, and I've never used it.
-
Jan 28th, 2003, 03:12 PM
#6
Hyperactive Member
-
Jan 28th, 2003, 08:03 PM
#7
Thread Starter
PowerPoster
Originally posted by transcendental
It contains the most common used headers. (Why don't you open that header and read its comments?)
I know it and did it too, perhaps i do not make my question clear. What i mean this those code like below:
Code:
#if !defined(AFX_STDAFX_H__1F8D8CC3_BD47_410A_819B_68B19F50A6CC__INCLUDED_)
#define AFX_STDAFX_H__1F8D8CC3_BD47_410A_819B_68B19F50A6CC__INCLUDED_
Also, if I delete this file from the project workspace generated by the VC++ wizard, I need to remove the following command from the project option too:
"stdafx.h"
Originally posted by The Hobo
I never have it in a WIN32 application either. Those are the only two types of projects I've done, and I've never used it.
me too
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|