Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
C++ Programming for Games Module I lập trình game bằng ngôn ngữ C++, chỉ ra các thủ thuật cho bạn, phân tích và viết 1 trò chơi từ đơn giản đến phức tạp | C Programming for Games Module I e-Institute Publishing Inc. 1 Copyright 2004 e-Institute Inc. All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means electronic or mechanical including photocopying recording or by any information storage or retrieval system without prior written permission from e-Institute Inc. except for the inclusion of brief quotations in a review. Editor Susan Nguyen Cover Design Adam Hoult E-INSTITUTE PUBLISHING INC www.gameinstitute.com Frank Luna Game Institute Faculty C Programming for Games 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. E-INSTITUTE PUBLISHING titles are available for site license or bulk purchase by institutions user groups corporations etc. For additional information please contact the Sales Department at sales@gameinstitute.com 2 Table of Contents CHAPTER 1 INTRODUCING C .9 Introduction.10 CHAPTER Objectives.10 1.1 Getting Started Your First C Program.10 1.1.1 Creating the Project.10 1.1.2 Adding A .CPP File to the Project.12 1.1.3 Writing the Code.13 1.1.4 Compiling Linking and Executing.14 1.2 The Print String Program Explained.16 1.2.1 Comments.16 1.2.2 White Space.17 1.2.2 Include Directives.18 1.2.3 Namespaces.18 1.2.4 The main . Function.20 1.2.5 std string.20 1.2.6 Input and Output with std cin and std cout.20 1.3 Variables.21 1.3.1 Variable Declarations and Definitions.24 1.3.2 Variable Names.25 1.3.3 The sizeof Operator.25 1.3.4 The unsigned Keyword.26 1.3.5 Literal Assignments.27 1.3.6 Type Conversions.27 1.3.7 Typedefs.30 1.3.8 Const Variables.30 1.3.9 Macros.30 1.4 Arithmetic Operations.31 1.4.1 Unary Arithmetic .