Oreilly - Learn By Example: C++ Programming - 75 Solved Problems
by Loonycorn | Released January 2018 | ISBN: 9781789137774
C++ will never seem intimidating again, once you're done with these examples.About This VideoC++ is incredibly deep, and it sometimes struggles to get you - the programmer - to understand what it's sayingThese 75 examples will help. Each is self-contained, has its source code attached, and gets across a specific C++ use-case. Each example is simple, but not simplistic.In DetailLike a gruff uncle, C++ seems intimidating, when it's just being helpful. These 75 examples will help you understand that. Let's parse that. C++ seems intimidating because all too often, what you see is not what you get. Usually, that's because C++ is trying to help you, but you don't realize that. This section is moving to C++ from C: If you are a C programmer, will run through what you need to know in order to move seamlessly to C++. Objects, Classes and Object-Oriented Programming: Access modifiers, classes, objects, the this pointer, new/delete and dynamic memory allocation gotchas. Operator overloading is a particularly complicated topic - C++ is virtually alone in the ubiquity of overloaded operators. Make sure this doesn't trip you up. Also go deep into the workings of const, static and friend. Inheritance in C++ is considerably more complicated than in Java, mostly because of multiple inheritances, and because of the co-existence of both virtual and non-virtual methods. Templates are a classic generic programming technique that was revolutionary when first added to C++. Understand template functions and classes, as well as template specializations. STL - the Standard Template Library - is incredibly powerful. Get a good sense of collections, iterators and algorithms - the major components of the STL. C++ casts are quite different than C-casts. Understand const_cast, static_cast and dynamic_cast, as well as Real Time Type Identification (RTTI), and the manner in which explicit conversions can be performed using static_cast. Exceptions and exception handling in C++. Show and hide more Publisher resources Download Example Code
- Chapter 1 : Introducing C++
- Chapter 2 : Moving from C to C++
- C and C++ - similar in some ways but actually very different 00:14:05
- C vs C++: Comments are different - and oh C++ has namespaces! 00:11:38
- Namespaces? Then we need a scope resolution operator 00:09:08
- Not just function overloading, C++ allows operator overloading as well! 00:13:28
- Default Values 00:14:41
- References, Const and Bool 00:17:59
- Chapter 3 : Objects and Classes
- Classes mean different things to different people! 00:12:59
- Classes - A logical grouping of data and functions 00:19:47
- Example 1 and 2: Define a really simple C++ class and instantiate it 00:14:16
- Example 3: Invoke the member functions of an object 00:14:34
- Example 4 and 5: Setup and clean up using constructors and destructors 00:18:08
- Example 6: Access Modifiers 00:19:36
- Chapter 4 : Multi-file Programs
- Example 7: Separating code into .cpp and .h files 00:16:02
- Example 7: Setting up dependencies with multiple files 00:17:01
- Chapter 5 : Dynamic Memory Allocation: new and delete
- Dynamic Memory Allocation 00:17:43
- C++ memory allocation explained 00:05:57
- Stop using malloc and free 00:12:16
- Do not mix new/delete for single variables with array equivalents new[]/delete[] 00:10:25
- Example 8 and 9: Stop using malloc and free, use new and delete instead! 00:13:38
- Example 10 and 11: Use new[] and delete [] for arrays - never mix new and new[] 00:10:30
- Example 12: The Placement new operator and the "this" pointer 00:17:07
- Chapter 6 : The C++ string Class
- The C++ string class 00:04:21
- Example 14: Strings 00:04:37
- Example 15: Inputing multiline strings 00:05:45
- Example 16: More common string operations 00:15:12
- Example 17: Comparing strings 00:06:07
- Example 18: Converting C++ to C strings (and vice versa) 00:04:41
- Chapter 7 : References
- The basic idea of references 00:10:48
- Example 19, 20 and 21: A simple reference, a const reference, and C++ swap 00:09:35
- Example 22, 23, 24, 25: Reference initialization, reassignment, aliasing, null 00:14:56
- Example 26, 27, 28, 29: References to pointers, references as return types 00:12:37
- Chapter 8 : The const Keyword
- Example 30 and 31: The C++ const keyword 00:13:44
- Example 32: const char* or char* const? 00:16:45
- Example 33, 34, 35, 36: Const methods, mutable, overloading on const, const_cast 00:16:15
- Passing function parameters const references 00:09:19
- Example 37: Passing function parameters const references 00:15:05
- Chapter 9 : The static Keyword
- The basic idea of static in C++ 00:10:34
- Example 38: Static member variables 00:13:09
- Example 39 and 40: Static member functions 00:09:19
- Example 41: const static member variables 00:06:58
- Chapter 10 : The friend Keyword
- The basic idea of friends in C++ 00:09:52
- Example 42: Friend functions 00:19:49
- Example 43: Friend classes 00:07:09
- Chapter 11 : Operator Overloading
- Understanding operator overloading - internal and external operators 00:15:55
- Choosing between internal and external implementations 00:09:22
- Example 44: Overloading the += operator 00:14:42
- Example 45: Overloading the + operator 00:12:59
- Example 46: Overloading the ++ (and --) operators 00:15:10
- Example 47: Overloading the assignment operator 00:19:49
- Operator Overloading - Streams Flashback 00:07:32
- Example 48: Overloading the << and >> operators 00:15:28
- Chapter 12 : Inheritance
- Understanding inheritance - Flashback to objects and classes 00:08:01
- Example 49 Understanding Inheritance 00:18:52
- Inheritance Explained – I 00:07:44
- Inheritance Explained – II 00:06:45
- Example 49: Access levels and inheritance types 00:08:22
- Example 49: Bringing all inheritance concepts together in code 00:15:57
- Examples 50, 51, 52: Types of inheritance 00:18:13
- Example 53: virtual functions 00:16:32
- Example 53 (continued) 00:08:54
- Example 54: pure virtual functions and abstract classes 00:10:28
- Example 55: Multiple Inheritances, and a Diamond Hierarchy 00:15:31
- Example 56: Virtual inheritance in a Diamond Hierarchy 00:06:27
- Example 57: Object Slicing 00:05:43
- Example 58: No virtual function calls in constructors or destructors! 00:06:21
- Example 59: Virtual destructors rock! 00:03:58
- Example 60: Why virtual functions should never have default parameters 00:02:54
- Example 61: The strange phenomenon of name hiding 00:03:34
- Example 62: Never redefine non-virtual base class methods 00:03:14
- Chapter 13 : Templates
- Templates as a form of generic programming 00:03:29
- Example 63: A simple template function 00:09:48
- Example 64: Overriding a default template instantiation 00:08:28
- Example 65: A templated smart pointer class 00:13:19
- Example 66: Template Specialization (partial or total) 00:08:00
- Chapter 14 : STL - The Standard Template Library
- Introducing the Standard Template Library 00:02:48
- Example 67: The STL vector 00:12:29
- Example 68: Iterators 00:08:29
- Example 69: map, an associative container 00:08:00
- Example 70: STL algorithms 00:10:20
- Chapter 15 : C++ Casts
- C++ casts are way cooler than C casts 00:05:16
- Example 71: const_cast 00:03:07
- Example 72: dynamic_cast, and RTTI 00:12:12
- Example 73: static_cast, and the explicit keyword 00:09:23
- Chapter 16 : Exceptions
- Exception handling and burglar alarm 00:07:01
- Example 74: Throwing exceptions 00:06:01
- Example 75: Handling exceptions with try/catch 00:05:56
Show and hide more 9781789137774.learn.by.example.OR.part1.rar
9781789137774.learn.by.example.OR.part2.rar
9781789137774.learn.by.example.OR.part3.rar
9781789137774.learn.by.example.OR.part4.rar
9781789137774.learn.by.example.OR.part5.rar