Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Visual C++ 2012
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2012 by Ivor Horton; ISBN: 978-1-118-36808-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2012 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 January 6th, 2013, 03:56 PM
Registered User
 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jeanpeters1963 Send a message via Yahoo to jeanpeters1963
Default Newbee to VC++

Hello,
I've got a problem with the term 'solution'.
I created for each example in the book a different directory (from Project0001 to Project 0050 now) and I placed the first example of the downloaded examples in Project0001 (this built pretty straightforward).
Now comes the problem: I placed the second example (Ex1_02.cpp) in folder Project0002 and now VC++ fails to build the program.
What am I doing wrong?
(The code is right, no errors)
 
Old January 7th, 2013, 06:47 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

Hi,

I'm not great at C++ and I don't have a compiler on this machine, but I suspect you have put both code files in the same C++ project and they are conflicting with each other.

Although you have put the files into a different directory, they are still part of the same application and the compiler will build them into 1 exe file. You need to create a new C++ project for each example. The simplest way is to create a new solution each time you do an example.

For now, the easiest way to think of things is:
  • Solution: A collection of one or more projects. If an application will contain lots of DLLs or EXEs, this lets you see the code for all of them in one place.
  • Project: Creates 1 DLL or EXE file.
  • Folder: Helps you organise your code. The compiler doesn't care about this tho - it just looks at what is in the project.
 
Old March 4th, 2013, 07:28 PM
Registered User
 
Join Date: Mar 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Was this solved?

If not could you copy the response from the output window when you try to compile?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming windows with VC 2005 or VC 2008 phuc_tran C++ Programming 2 December 4th, 2009 10:04 AM
Migrating from VC++ 6 to VC++ 2005 raghud Visual C++ 2005 1 November 4th, 2009 06:13 AM
VC++ 6 dannytran Visual C++ 0 January 4th, 2006 07:49 AM
Help us in VC++ MMazhar Visual C++ 0 December 10th, 2005 03:49 PM
convert VC++ 5.0 project to VC++ 6.0 MIDL ERR mdahd90943 Visual C++ 0 May 26th, 2005 08:57 AM





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