Difference between revisions of "Beginner C++ Game Programming Tutorial 12"
(→Video Timestamp Index) |
|||
Line 1: | Line 1: | ||
Here we learn about the concept of encapsulation (ask your mom where she keeps the Vicodin!), which is the main principle behind object oriented programming (so listen the fuck up eh?). We also learn how to construct shit, and how to make our shit private. | Here we learn about the concept of encapsulation (ask your mom where she keeps the Vicodin!), which is the main principle behind object oriented programming (so listen the fuck up eh?). We also learn how to construct shit, and how to make our shit private. | ||
+ | |||
+ | == <span style="color:pink">Important Note</span> == | ||
+ | Visual Studio has a <cool feature> wherein when you use "quick actions... -> move definition location" on a constructor, it adds a goddamn <code>inline</code> keyword which fucks the whole goddamn works up! D:< This is fixed in the homework solution, but if you are attempting the homework before peeking (as you should be), then this could fuck you up royally. Keep it in mind. | ||
== Concepts Taught == | == Concepts Taught == |
Revision as of 02:32, 24 June 2018
Here we learn about the concept of encapsulation (ask your mom where she keeps the Vicodin!), which is the main principle behind object oriented programming (so listen the fuck up eh?). We also learn how to construct shit, and how to make our shit private.
Contents
Important Note
Visual Studio has a <cool feature> wherein when you use "quick actions... -> move definition location" on a constructor, it adds a goddamn inline
keyword which fucks the whole goddamn works up! D:< This is fixed in the homework solution, but if you are attempting the homework before peeking (as you should be), then this could fuck you up royally. Keep it in mind.
Concepts Taught
- Encapsulation and data hiding
- How to create a constructor
- How do initialize embedded objects (class initializer list)
- How to control member access (
private
keyword)
Encapsulation
This page has some interesting discussion on why we bother with all this encapsulation bullshit.
Video Timestamp Index
Homework
- Encapsulate the fuck out of the
Dude
class. - Increase the number of
Poo
objects from 3 to 9.
The solution is given in this video.
Downloads
The starting code for Tutorial 12 is here.