Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Visual C++ 2010
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2010 by Ivor Horton; ISBN: 9780470500880
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2010 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 7th, 2011, 12:44 PM
Registered User
 
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 3 Times in 1 Post
Default stdAfx.h : include or not include !

Some downloaded files don't compile, unless you add #include "stdAfx.h"

Very often you get the compiler message :
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?

Your downloaded Ex_xx.cpp is right, but you need to change the default compiler option :
1.Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
2.Click the C/C++ folder.
3.Click the Precompiled Headers property page.
4.Modify the Create/Use PCH Through File property or the Create/Use Precompiled Header property

The default setting of VS2010 is :
Visual C++ will not compile anything before the #include "stdafx.h" in the source file.
The Following 3 Users Say Thank You to sgazaix For This Useful Post:
ahdtyy (September 30th, 2011), CPLUSPLUSGUY (September 25th, 2011)
 
Old September 25th, 2011, 10:00 PM
Registered User
 
Join Date: Sep 2011
Posts: 1
Thanks: 1
Thanked 1 Time in 1 Post
Smile stdAfx.h: include or not include

The answer to this post is EXACTLY the question I had. I've used Express 2008, but Express 2010 seems to be quite different. Also, I keep getting the Compiler error, "Fatal Error External Refernce not found." Perhaps this is part of the same issue as stdAfx.h inclusion.
I think I shall like this forum.
Thanks much!
The Following User Says Thank You to CPLUSPLUSGUY For This Useful Post:
ahdtyy (September 30th, 2011)
 
Old September 30th, 2011, 12:19 PM
Registered User
 
Join Date: Sep 2011
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Cool

i like this ,i am a new coming ,my english is not good . please excuse me.
i like question.





Similar Threads
Thread Thread Starter Forum Replies Last Post
c #include vicoldan Need help with your homework? 0 December 3rd, 2007 06:15 AM
Include in C# su C# 2 December 15th, 2006 04:59 AM
#include arielote C# 3 February 26th, 2006 07:54 PM
difference between include file & include virtual crmpicco Classic ASP Basics 2 January 23rd, 2006 11:50 AM
xsl:include within include chuck123ie XSLT 1 January 5th, 2006 11:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.