Difference between revisions of "Intermediate C++ Game Programming Tutorial 8"

From Chilipedia
Jump to: navigation, search
(Created page with "<code>std::vector<></code>. What does it have to do with mathematical vectors? Nothing at all. So why didn't they just name it <code>std::dynamic_array<></code>? Good question...")
 
(Topics Covered)
Line 6: Line 6:
 
* Underlying implementation of <code>std::vector<></code>
 
* Underlying implementation of <code>std::vector<></code>
 
* Managing <code>std::vector<></code> capacity
 
* Managing <code>std::vector<></code> capacity
* Pointers to <code>std::vector<></code> data
+
* Pointers to <code>std::vector<></code> underlying data memory
  
 
== Video Timestamp Index ==
 
== Video Timestamp Index ==

Revision as of 16:38, 5 August 2017

std::vector<>. What does it have to do with mathematical vectors? Nothing at all. So why didn't they just name it std::dynamic_array<>? Good question, good question. Next question. Seriously though, std::vector<> is the shit and we are going to be using it all the GD time from now on. Get hype.

Topics Covered

  • Basic std::vector<> operations
  • Concept of template classes
  • Underlying implementation of std::vector<>
  • Managing std::vector<> capacity
  • Pointers to std::vector<> underlying data memory

Video Timestamp Index

Tutorial 8

Lost Footage

Chili recorded some footage where he shows a concrete example of using std::vector<> in the Database code from the Intermediate 4 homework. It was cut from the final video to keep the length under 30 minutes (Ritalin is expensive in some countries ;)), but you can find that footage here:

Source Code

GitHub Repo for Snek

Homework

The homework is to modify Poison Snek to use std::vector<>. You will see the light.

See also