Wrox Programmer Forums
|
BOOK: Professional C++, 2nd Edition
This is the forum to discuss the Wrox book Professional C++, 2nd Edition by Marc Gregoire, Nicholas A. Solter, Scott J. Kleper ; ISBN: 978-1-1181-6995-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C++, 2nd Edition 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 February 29th, 2012, 11:37 AM
Authorized User
 
Join Date: Oct 2011
Posts: 12
Thanks: 5
Thanked 0 Times in 0 Posts
Default Two main()'s, page 44

On page 44, it's unclear to me why there are two "main()"'s. They can't both be in the same program so I am unsure as to which to remove. Thanks.

Last edited by golfer43; February 29th, 2012 at 11:40 AM.. Reason: Misspelled title
 
Old March 3rd, 2012, 05:52 PM
Registered User
 
Join Date: Mar 2012
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

Are you sure?
On p 44 there are 2 differents code : databasetest.cpp & UserInterface.cpp
Those files are 2 differents files wich should be compiled and run seperately
As explained the first code is a code that help to test the classe
The second one is a more complete "application" which use the classe and involve a "user interface"
I hope this help to clarify
Regards, Philippe
The Following User Says Thank You to 40tude For This Useful Post:
golfer43 (March 9th, 2012)
 
Old March 4th, 2012, 11:28 AM
Wrox Author
 
Join Date: Mar 2011
Posts: 49
Thanks: 0
Thanked 4 Times in 4 Posts
Default

40tude is correct.
There are two main's, but those are two different programs: one test program, and one User Inteface program.
The Following User Says Thank You to Marc Gregoire For This Useful Post:
golfer43 (March 9th, 2012)
 
Old March 9th, 2012, 07:38 PM
Authorized User
 
Join Date: Oct 2011
Posts: 12
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Thanks to both of you. I think what got me confused was the phrase under each program that said, "Code snippet from EmployeeDB\...

I was thinking that they were both in the same project because they both had the EmployeeDB in them. Thanks again.

BTW, Great Book!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error page 44 Devus BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 1 March 2nd, 2010 08:36 AM
Part 1 - page 44 Shontal BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 1 September 1st, 2009 10:38 PM
iframe refresh scrolls main page down kdm260 ASP.NET 2.0 Professional 0 May 16th, 2006 02:06 PM
Refreshing "main" page from "pop up" window acedanger Javascript How-To 2 May 12th, 2006 08:44 AM





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