Buch, Englisch, 644 Seiten, Book, Format (B × H): 178 mm x 254 mm, Gewicht: 1259 g
Quick, Easy, and Fun C++ for Beginners
Buch, Englisch, 644 Seiten, Book, Format (B × H): 178 mm x 254 mm, Gewicht: 1259 g
ISBN: 978-1-4842-5186-7
Verlag: Apress
Zielgruppe
Professional/practitioner
Autoren/Hrsg.
Fachgebiete
- Mathematik | Informatik EDV | Informatik Programmierung | Softwareentwicklung Spiele-Programmierung, Rendering, Animation
- Mathematik | Informatik EDV | Informatik Programmierung | Softwareentwicklung Programmierung: Methoden und Allgemeines
- Mathematik | Informatik EDV | Informatik Programmierung | Softwareentwicklung Programmier- und Skriptsprachen
- Mathematik | Informatik EDV | Informatik Programmierung | Softwareentwicklung Software Engineering
Weitere Infos & Material
The text is around 120,000 words long. Most chapters take one week each to cover in a standard (3- or 4-hour) college class. It covers two semesters, with a few extra chapters at the end for those wanting to go further.Chapter 1-13 are for semester one , covering variables, constants, types including enumeration types, control structures, functions, standard I/O, programming style, algorithm development, and the debugger. The climax of the sequence is Chapter 12, Building Your Own Arcade Game. As it stands now, all but Chapter 13 use a graphics library for whiz-bang. Chapter 14-23 are for the second semester , covering character arrays, pointers and dynamic memory, classes, inheritance, templates including the Standard Template Library, exceptions, virtual functions, and elementary data structures (strings, stacks, queues, vectors, and lists). The climax of this sequence is the construction of linked lists. Only Chapter 21 uses graphics -- the rest use standard console I/O, which is essential before going on to subsequent classes in the major. Chapters 24-29 are optional extras : namespaces, construction of libraries, history of C++, bit twiddling, sstream, shared_ptr, the C language, and other topics. Appendices cover setting up the graphics library on your machine, escape sequences, keywords, standard libraries, g++ debugger commands, and graphics-library functions. Introduction. 1-1 1 Getting started. 1-91.1 A simple program.. 1-91.2 Creating an SSDL project 1-121.3 Shapes, and the functions that draw them.. 1-271.4 consts and colors. 1-351.5 Text 1-37 First week.Prominent examples from this chapter: a drawing of a bug's head; a neatly printed poem. 2 Images and sound. 2-432.1 Images, and changing window characteristics. 2-432.2 Multiple images together 2-482.3 Sound. 2-51Second week.Example: a slide show (Your yard gnome's travel pics). 3 Math: types, operations, consts, and math functions. 3-553.1 Variables, constants, enums as constants. 3-553.2 Math operators. 3-573.3 Mathematical functions. 3-61Third week.Examples: diver on a diving board; a 5-pointed star. 4 Mouse, and if. 4-67 4.1 Mouse functions, and variables associated. 4-67 4.2 if.. 4-69 4.3 Boolean variables. 4-73 4.4 Where Waldo is: using mouse input 4-75 Fourth week.Example: Where's Waldo? (pending approval from Waldo's author). 5 Loops and text input 5-795.1 Text input 5-795.2 while and do-while. 5-815.3 for-loops. 5-855.4 The char type, and cctype.. 5-905.5 switch.. 5-94Fifth week.Examples: the Monty Hall problem; menus. 6 Algorithms and the development process. 6-976.1 The Biscuit Algorithm, or how planning ahead reduces your workload. 6-976.2 Writing a program, from start to finish. 6-100 Sixth week. 7 Functions. Example: a multi-panel comic. 7-1067.1 Functions that return values. 7-1067.2 Functions that return nothing. 7-1107.3 Why have functions, anyway?. 7-117Still sixth week.Example: a multi-frame comic (illustrates code reuse). 8 Functions (cont'd). Example: various random functions. 8-126 8.1 Boolean functions. 8-126 8.2 Random numbers. 8-127 8.3 Multiple values provided: using & parameters. 8-133 8.4 Identifier scope 8-138 8.5 A final note on algorithms. 8-140 Seventh and eighth weeks.Examples: various functions using random number generation. 9 Using the debugger (optional, recommended) 9-141 9.1 Example: drawing a flag. 9-141 9.2 A debugger session in Visual Studio. 9-145 9.3 Debugging g++ programs with ddd and gdb. 9-150 9.4 Other common debugging techniques. 9-156 Ninth week. 10 enum and arrays. 10-159 10.1 Enumeration types. 10-15910.2 Arrays. 10-160 10.3 Multidimensional arrays. 10-166 Tenth week.Examples: checkers, tic-tac-toe. 11 animation with structs and sprites. 11-173 11.1 struct.. 11-17311.2 Making a movie with struct and while.. 11-176 11.3 Sprites. 11-182 Eleventh week.Examples: bouncing balls; a video aquarium. 12 Building your own arcade game: input, collisions, and putting it all together 12-188 12.1 Input for arcade games: determining input states. 12-188 12.2 Input for arcade games: events. 12-190 12.3 Latency. 12-191 12.4 Collisions. 12-194 12.5 The big game. 12-195 Twelfth and thirteenth weeks.Example: the student's own game. 13 Standard I/O and file operations. 13-20413.1 Standard I/O.. 13-20413.2 Compiling in Visual C++. 13-20513.3 Compiling with g++. 13-20913.4 Treating cin and cout as files (optional) 13-210 13.5 File I/O using file names (optional) 13-216 Fourteenth week.Examples: various programs reading/writing text files. Except for Chapter 21 (virtual functions), this and subsequent chapters use standard console I/O, not the SSDL graphics library. This chapter likely ends the first semester, so if students are going into a class with a different textbook, they are ready for the console I/O it will certainly require them to know. 14 Character arrays and dynamic memory (pointers) 14-221 14.1 Character arrays. 14-221 14.2 Dynamic allocation of arrays. 14-224 14.3 Using the * notation. 14-228 Second semester, first week.Examples: C's string functions, written as examples or offered as exercises; code with new and delete 15 Classes: the basics. 15-23215.1 A simple class. 15-23215.2 Constructors. 15-235 15.3 const objects, const member functions... 15-239 15.4 ...and const parameters. 15-24115.5 Multiple constructors. 15-24115.6 Default parameters for code reuse. 15-24415.7 Date program (so far) 15-245Second week.Examples: the Date class; the student's own Time class. 16 Classes, continued. 16-248 16.1 inline functions for efficiency. 16-248 16.2 Access functions. 16-24916.3 static members, and other members of the entire class (optional) 16-25016.4 Separate compilation and include files. 16-25216.5 Backing up a multi-file project 16-25616.6 Separate compilation in Microsoft Visual C++. 16-25716.7 Separate compilation in g++. 16-25916.8 Final Date program.. 16-264Third week.Examples: the Date class; the student's own Time class, continued. 17 Operators, and destructors. 17-268 17.1 The basic string class -- and default arguments. 17-268 17.2 Destructors. 17-270 17.3 Binary and unary operators. 17-271 17.4 Assignment operators and *this.. 17-273 17.5 Arithmetic operators. 17-27517.6 [] and () operators. 17-27917.7&^> and <<: operators that aren't class members. 17-281 17.8 ++ and -- 17-283 17.9 Some fun with constructors. 17-284 17.10 ...the final String class. 17-285 17.11 #include .. 17-291 Fourth and fifth weeks.Examples: a String class; the student's own Point or Fraction class. 18 Exceptions, recursion, and O notation. 18-29218.1 Exceptions. 18-29218.2 Recursion (optional) 18-30018.3 Algorithm analysis and O-notation (optional) 18-303Sixth week.Examples: a Stack class; a factorial function; binary and linear search. 19 Classes, continued: inheritance. 19-309 19.1 The basics of inheritance. 19-309 19.2 Inheritance as a concept 19-312 19.3 Calling parent class constructors. 19-314 19.4 Inheritance and destructors. 19-314 19.5 protected sections. 19-314 19.6 Types of inheritance. 19-31519.7 An inheritance hierarchy. 19-319Seventh and eighth weeks.Examples: card games. 20 Template functions and classes. 20-33520.1 template functions. 20-33520.2 The Vector class. 20-33820.3 Making Vector a template. 20-34120.4 Unusual class templates (optional) 20-34520.5 #include .. 20-346Ninth week.Example: the Vector class 21 Multiple inheritance and virtual functions. 21-347 21.1 Multiple inheritance. 21-347 21.2 Virtual functions. 21-348 Tenth and eleventh weeks.Example: a Shape class. This uses the SSDL library. 22 Linked lists. 22-359 22.1 What lists are, and why have them.. 22-359 22.2 T List::operator[] (int index) const; 22-363 22.3 ->: a bit of syntactic sugar 22-366 22.4 A bit more friendly syntax: pointers as conditions. 22-367 22.5 List::~List(); 22-367 22.6 The linked list class. 22-368 22.7 #include .. 22-371 Twelfth week.Example: the List class. 23 The Standard Template Library (STL) 22-37122.1 Iterators, and auto (C++ 11 on) 22-37122.2 pair.. 22-375 22.3 algorithm, and functions using iterators. 22-375 22.4 Function pointers and objects. 22-376Thirteenth week.Example: an extension of the List class to use iterators. This likely ends the second semester. If there is extra time, the instructor may choose to add the chapter on C, sstream, iomanip, or some other topic from remaining chapters. Otherwise, remaining chapters are extras for those who want to go further.24 Building bigger projects. 23-37723.1 Namespaces. 23-37723.2 Conditional compilation. 23-37823.3 Libraries. 23-378 25 History. 24-38224.1 SIMULA 67. 24-38224.2 Smalltalk. 24-38224.3 What "object-oriented" is. 24-38324.4 C.. 24-38324.5 C++. 24-383 26 Esoterica (recommended) 25-38525.1 iomanip. 25-38525.2 Bit twiddling: &, |, and ~. 25-38925.3 sstream: strings that are I/O streams. 25-38925.4 Command-line arguments. 25-39225.5 Exceptions: more detail 25-39625.6 Template specialization. 25-39925.7 shared_ptr (C++ 11 on) 25-40025.8 cast operators. 25-40125.9 Saving run time with move constructors/move = (C++ 11 on) 25-40225.10 Multiple inheritance with virtual base classes. 25-402 27 Esoterica (not so recommended) 26-40426.1 Microsoft Windows help. 26-40426.2 Unix help. 26-40526.3 friends, and why you shouldn't have any. 26-40526.4 pImpls, iosfwd, precompiled headers, and other afflictions. 26-408 26.5 Precompiled headers. 26-411 28 C.. 27-412 27.1 Compiling C.. 27-412 27.2 #define. 27-413 27.3 stdio.h. 27-414 27.4 Parameter passing with *.. 27-421 27.5 static global declarations (optional) 27-423Examples: programs using C's stdio functions ( printf , sscanf , etc.). 29 Moving on with SDL.. 28-42428.1 A basic program in SDL.. 28-426 AppendicesA. Setting up SDL and SSDL.. 427B. Making your own SSDL project 429C. Basic types. 429D. Escape sequences. 430E. C++ keywords. 430F. Operators. 432G. ASCII codes. 433H. Standard libraries. 435I. Common gdb commands. 438J. SSDL reference. 440 Index 448 References. 455




