Intermediate C Programming下载

PIPI_333 2018-08-22 08:38:27
普渡大学陆永祥教授著作,适合有C语言基础的人学习,书是全英文的。
相关下载链接://download.csdn.net/download/qq_43032110/10618581?utm_source=bbsseo
...全文
74 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
Program 3D Games in C++: The #1 Language at Top Game Studios Worldwide C++ remains the key language at many leading game development studios. Since it’s used throughout their enormous code bases, studios use it to maintain and improve their games, and look for it constantly when hiring new developers. Game Programming in C++ is a practical, hands-on approach to programming 3D video games in C++. Modeled on Sanjay Madhav’s game programming courses at USC, it’s fun, easy, practical, hands-on, and complete. Step by step, you’ll learn to use C++ in all facets of real-world game programming, including 2D and 3D graphics, physics, AI, audio, user interfaces, and much more. You’ll hone real-world skills through practical exercises, and deepen your expertise through start-to-finish projects that grow in complexity as you build your skills. Throughout, Madhav pays special attention to demystifying the math that all professional game developers need to know. Set up your C++ development tools quickly, and get started Implement basic 2D graphics, game updates, vectors, and game physics Build more intelligent games with widely used AI algorithms Implement 3D graphics with OpenGL, shaders, matrices, and transformations Integrate and mix audio, including 3D positional audio Detect collisions of objects in a 3D environment Efficiently respond to player input Build user interfaces, including Head-Up Displays (HUDs) Improve graphics quality with anisotropic filtering and deferred shading Load and save levels and binary game data Whether you’re a working developer or a student with prior knowledge of C++ and data structures, Game Programming in C++ will prepare you to solve real problems with C++ in roles throughout the game development lifecycle. You’ll master the language that top studios are hiring for—and that’s a proven route to success. Table of Contents Chapter 1: Game Programming Overview Chapter 2: Game Objects and 2D Graphics Chapter 3: Vectors and Basic Physics Chapter 4: A
C Programming.pdf Contents Computers 1 An Introduction to Computers........................................................................................1 Hardware and Software ....................................................................................1 Data and Information .......................................................................................2 Data Processing................................................................................................2 Programming Languages 4 What is Programming? ..................................................................................................4 From Problem to Program ................................................................................5 Programming Languages ...............................................................................................8 C 8 A look at C ....................................................................................................................8 Making C Run..................................................................................................9 Creating C Programs........................................................................................9 What Comprises a C Program?.......................................................................10 The Advantages of C ......................................................................................11 The Disadvantages of C..................................................................................11 A First C Program 11 The Program Example .................................................................................................11 #include ........................................................................................................12 .......................................................................................................12 void ...............................................................................................................12 main ..............................................................................................................13 ( void )...........................................................................................................13 { .....................................................................................................................13 float ...............................................................................................................13 height, width, area, wood_length................................................................13 ; .....................................................................................................................14 scanf .............................................................................................................14 ( .....................................................................................................................14 "%f", ..............................................................................................................14 &height..........................................................................................................15 ) ; ...................................................................................................................15 scanf ( "%f", &width ) ;.................................................................................15 area = 2 * height * width ;............................................................................15 wood_length = 2 * ( height + width ) * 3.25 ;.................................................16 printf..............................................................................................................16 ( "The area of glass needed is : %f metres.\n",.........................................16 area ) ; ..........................................................................................................17 printf ( "The length of wood needed is : %f feet.\n", wood_length ) ; ......17 } .....................................................................................................................17 Punctuation ....................................................................................................17 Variables 18 ii Variables and Data .........................................................................................18 Types of Variables .......................................................................................................18 Declaration ..................................................................................................................18 int variables....................................................................................................19 float variables ................................................................................................19 char variables ................................................................................................19 Missing Types ................................................................................................19 Variable Declaration ....................................................................................................19 Giving Values to Variables ..........................................................................................20 Expressions ....................................................................................................21 Types of Data in Expressions..........................................................................22 Getting Values into the Program ..................................................................................23 Writing a Program 24 Comments......................................................................................................24 Program Flow ..............................................................................................................24 Conditional Execution - if...............................................................................25 Conditions and Relational Operators ..............................................................26 Combining Logical Operators.........................................................................27 Lumping Code Together.................................................................................27 Magic Numbers and #define..........................................................................28 Loops .............................................................................................................29 Breaking Out of Loops ...................................................................................32 Going Back to the Top of a Loop ....................................................................32 More Complicated Decisions ..........................................................................33 Complete Glazing Program ............................................................................33 Operator Shorthand........................................................................................34 Statements and Values....................................................................................35 Neater Printing...............................................................................................36 Functions 37 Functions So Far ..........................................................................................................37 Function Heading ...........................................................................................37 Function Body ................................................................................................38 return .............................................................................................................38 Calling a Function..........................................................................................38 Scope .............................................................................................................39 Variables Local to Blocks ...............................................................................40 Full Functions Example..................................................................................40 Pointers.......................................................................................................................42 NULL Pointers ...............................................................................................44 Pointers and Functions ...................................................................................44 Static Variables............................................................................................................45 Arrays 46 Why We Need Arrays ..................................................................................................46 Sorting ...........................................................................................................47 Array Types and Sizes..................................................................................................49 More Than One Dimension ............................................................................50 Switching 53 Making Multiple Decisions ..........................................................................................53 Strings 55 iii How long is a piece of string?.......................................................................................55 Putting Values into Strings ..........................................................................................56 Using Strings ...............................................................................................................57 The String Library .......................................................................................................58 strcpy .............................................................................................................59 strcmp ............................................................................................................59 strlen..............................................................................................................59 Reading and Printing Strings .......................................................................................59 Bomb Proof Input.........................................................................................................60 Structures 61 What is a Structure?.....................................................................................................61 How Structures Work...................................................................................................63 Pointers to structures....................................................................................................63 Defining your own Types .............................................................................................64 Files 65 When do we use Files? .................................................................................................65 Streams and Files ...........................................................................................65 fopen and fclose ...........................................................................................................66 Mode String ...................................................................................................68 File Functions ..............................................................................................................70 fread and fwrite ..............................................................................................70 The End of the File and Errors.....................................................................................71 Memory 72 Fetching Memory.........................................................................................................72 malloc ............................................................................................................72 free.................................................................................................................73 The heap......................................................................................................................73 C and Large Programs 74 Building Large Programs in C .....................................................................................74 The Compile and Link Process .......................................................................74 Referring to External Items ............................................................................75 The Make Program.........................................................................................76 Projects ..........................................................................................................76 The C Pre-Processor.....................................................................................................77 The #include Directive ...................................................................................77 Conditional Compilation ................................................................................77 A Sample Project .........................................................................................................78 The Problem...................................................................................................78 The Data Structure .........................................................................................78 Program Files.................................................................................................79 The Most Important Bit!.................................................................................84 Glossary of Terms 93

13,654

社区成员

发帖
与我相关
我的任务
社区描述
CSDN 下载资源悬赏专区
其他 技术论坛(原bbs)
社区管理员
  • 下载资源悬赏专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧