C++ Programming for
the Absolute Beginner,
Second Edition
Mark Lee
Course Technology PTR
A part of Cengage Learning
Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States
C++ Programming for the Absolute
Beginner, Second Edition: Mark Lee
Publisher and General Manager, Course
Technology PTR: Stacy L. Hiquet
Associate Director of Marketing:
Sarah Panella
Manager of Editorial Services:
Heather Talbot
Marketing Manager: Mark Hughes
Acquisitions Editor: Mitzi Koontz
Project Editor: Jenny Davidson
Technical Reviewer: Keith Davenport
PTR Editorial Services Coordinator:
Jen Blaney
Interior Layout Tech: Value Chain
International
Cover Designer: Mike Tanamachi
Indexer: Sharon Shock
Proofreader: Sara Gullion
© 2009 Course Technology, a part of Cengage Learning.
ALL RIGHTS RESERVED. No part of this work covered by the copyright
herein may be reproduced, transmitted, stored, or used in any form or by
any means graphic, electronic, or mechanical, including but not limited to
photocopying, recording, scanning, digitizing, taping, Web distribution,
information networks, or information storage and retrieval systems, except
as permitted under Section 107 or 108 of the 1976 United States Copyright
Act, without the prior written permission of the publisher.
For product information and technology assistance, contact us at
Cengage Learning Customer & Sales Support, 1-800-354-9706
For permission to use material from this text or product, submit all
requests online at cengage.com/permissions Further permissions
questions can be emailed to permissionrequest@cengage.com
All trade
marks are the property of their respective owners.
Library of Congress Control Number: 2008939939
ISBN-13: 978-1-59863-875-2
ISBN-10: 1-59863-875-0
Course Technology, a part of Cengage Learning
20 Channel Center Street
Boston, MA 02210
USA
Cengage Learning is a leading provider of customized learning solutions
with office locations around the globe, including Singapore, the United
Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at:
international. cengage.com/region
Cengage Learning products are represented in Canada by Nelson
Education, Ltd.
For your lifelong learning solutions, visit courseptr.com
Visit our corporate website at cengage.com
Printed in the United Sta
tes of America
1 2 3 4 5 6 7 11 10 09
4
eISBN-1
0: 1-59863-9 1-2
To Dirk Henkemans,
my best friend. I am
lost without you.
F
OREWORD
he video game industry is unique in that it regularly incorporates every
major discipline of computer science. From 3D graphics and artificial in-
telligence to operating system theory and database design, if you are
designing a commercial video game, you will eventually run into problems from
each of these fields. Some of these fields mean working with specialized languages,
but ultimately the two languages that are as common to the game industry as
crunch time, caffeinated beverages, and pizza are C and C++. Despite a few com-
mercial games written in Java (which is very similar to C++), almost every game
that you play is written in either C or C++. It doesn’t matter whether the game runs
on a PC, a game console, or even an arcade machine, chances are that C or C++
routines are at its heart. Even in cases when performance dictates that a routine
needs to be written in assembly language to squeeze out more speed, it is common
practice to first write the routine in C or C++.
During my years in the industry, I have interviewed over one hundred applicants
for programming positions and have read resumes from thousands more. Through
all of this, I continually look for three things in a strong candidate. The first is
strong problem-solving skills. With constantly changing technologies and fierce
competition, game programming is always throwing new problems at us. Conse-
quently, excellent problem-solving skills are not only a luxury, but they are also a
requirement. Second, a good candidate has been exposed to the entire spectrum
of computer science disciplines. Even when programmers have specialized in one
area, the solution to a problem often lies in a field outside their area of expertise.
Finally, I look for strong C/C++ skills. C/C++ skills are to a game programmer what
paint and brushes are to a painter. They are the tools of the trade and, as such,
they need to be finely honed.
Although C++ is widely used as a teaching language, this wasn’t always the case. I
can still recall my first exposure to C programming. Until that time, all of my
programming had been in Basic (my first video game was written in it), Pascal, and
Fortran. I had heard of C; according to rumor, it was going to be the language to
know. I was looking forward to my next computer science course: “Introduction
to Programming Languages.” I assumed that the course would teach me how to
program in C. I was wrong. The only reference to C in the entire course was, “Here
T
评论1
最新资源