Charles River Media, Inc.
Copyright 2003 by CHARLES RIVER MEDIA, INC. All rights reserved.
No part of this publication may be reproduced in any way, stored in a retrieval system of any type, or transmitted by any means or media, electronic or mechanical, including, but not limited to, photocopy, recording, or scanning, without prior permission in writing from the publisher.
Publisher: David Pallai
Production: Paw Print Media
Cover Design: The Printed Image
CHARLES RIVER MEDIA, INC.
20 Downer Avenue, Suite 3
Hingham, Massachusetts 02043
This book is printed on acid-free paper.
Chuck Easttom. C++ Programming Fundamentals. ISBN: 1-58450-237-1
All brand names and product names mentioned in this book are trademarks or service marks of their respective companies. Any omission or misuse (of any kind) of service marks or trademarks should not be regarded as intent to infringe on the property of others. The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products.
Library of Congress Cataloging-in-Publication Data
C++ programming fundamentals / Chuck Easttom.
p. cm. Summary: Introduces basic concepts of C++ programming, including Microsoft Visual C++, using examples from such areas as game programming and GPA calculation, and provides fully functional sample programs.
ISBN 1-58450-237-1 (paperback with CD-ROM : alk. paper)
1. C++ (Computer program language)—Juvenile literature. [1. C++ (Computer program language) 2. Programming (Computers) 3. Computers.] I. Title.
QA76.73.C153 E23 2003
Printed in the United States of America
02 7 6 5 4 3 2
CHARLES RIVER MEDIA titles are available for site license or bulk purchase by institutions, user groups, corporations, etc. For additional information, please contact the Special Sales Department at 781-740-0400.
Requests for replacement of a defective CD-ROM must be accompanied by the original disc, your mailing address, telephone number, date of purchase, and purchase price. Please state the nature of the problem, and send the information to CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043. CRM’s sole obligation to the purchaser is to replace the disc, based on defective materials or faulty workmanship, but not on the operation or functionality of the product.
LIMITED WARRANTY AND DISCLAIMER OF LIABILITY
The CD-ROM which accompanies this book may be used on a single PC only. The license does not permit the use on a network (of any kind). You further agree that this license grants permission to use the products contained herein, but does not give you right of ownership to any of the content or product contained on this CD-ROM. Use of third party software contained on this CD-ROM is limited to and subject to licensing terms for the respective products.
Charles River Media, Inc. (“CRM”) and/or anyone who has been involved in the writing, creation, or production of the accompanying code (“The software”), or the third party products contained on this CD-ROM, cannot and do not warrant the performance or results that may be obtained by using the software. The author and publisher have used their best efforts to ensure the accuracy and functionality of the textual material and programs contained herein; We, however, make no warranty of this kind, express or implied, regarding the performance of these programs. The software is sold “as is” without warranty (except for defective materials used in manufacturing the disC or due to faulty workmanship); the sole remedy in the event of a defect is expressly limited to replacement of the disc, and only at the discretion of CRM.
The author, the publisher, developers of third party software, and anyone involved in the production and manufacturing of this work shall not be liable for damages of any kind arising out of the use of (or the inability to use) the programs, source code, or textual material contained in this publication. This includes, but is not limited to, loss of revenue or profit, or other incidental or consequential damages arising out of the use of the product.
The sole remedy in the event of a claim of any kind is expressly limited to replacement of the book and/or CD-ROM, and only at the discretion of CRM.
The use of “implied warranty” and certain “exclusions” vary from state to state, and may not apply to the purchaser of this product.
No book is really the work of a single person, even if only one name appears on the title. First and foremost, I would like to thank a few of my students and one of my colleagues that reviewed rough drafts for me. Patrick Langlinais, Nicholas Russo, and Susan Hebert were all gracious enough to look over rough drafts for me and to give me their opinions and their encouragement. The publishing team at Charles River Media has also been simply amazing. They carefully edited and reviewed the rough drafts, saving me from embarrassing myself! Finally, I must also thank my wife, Misty, and my son, AJ. Without their patience and support, none of the books I write would be possible.