Difference between revisions of "Beginner C++ Game Programming Tutorial 11"
(→Homework) |
(→Homework) |
||
| Line 16: | Line 16: | ||
# Make a second <code>DrawRect</code> function that takes a single point (top left corner) and the dimensions as parameters. | # Make a second <code>DrawRect</code> function that takes a single point (top left corner) and the dimensions as parameters. | ||
| − | The solution is given in | + | The solution is given in [https://youtu.be/MOhF8Z2jW0k this] video. |
== Downloads == | == Downloads == | ||
Revision as of 13:34, 2 November 2016
References are sweet because they let us control our shit from far away. Remember the days when we had to actually get up to change the channel on the TV? Remember TV? Fuck that shit! Also, const correctness is for big dick gangstas that don't give any fucks.
Contents
Concepts Taught
- References
- Passing by reference
-
constcorrectness (redux)
Const Correctness
The use of const as as a means of communication by code and as method to prevent you and other people from shooting you (your code / themselves) in the dick is something that Chili finds cromulent. For some info on how const makes your code less shitty, check this. If you're still not sold (I happen to like being a human dumpster fire, thank you very much Chili), here is a video showing how using const can make your code a fuck of a lot faster: cool beans.
Video Timestamp Index
Coming soon!
Homework
- Move the drawing code for
DudefromGameinto theDudeclass. - Make a second
DrawRectfunction that takes a single point (top left corner) and the dimensions as parameters.
The solution is given in this video.