C++ Survival Kit
Keeping It Classy
Memory Lane
Committing Crimes in both Direction and Magnitude!
C++ Boss Battle
100

This symbol placed after a parameter's data type causes the parameter to be passed by reference.

What is the &?
100

This special member function is used to instantiate an object.

What is a constructor?

100

This operator accesses the value stored at the memory address contained in a pointer.

What is the deref operator *? (If you say asterisk, I'll give it to you)

100

Similar to an array, this data structure holds a number of elements.

What is a vector?

100

This keyword is used when a program signals that an exception has occurred.

What is throw?

200

This type of loop is commonly used when you know beforehand how many times the body should execute.

What is a for loop?

200
In this file, class definitions, function prototypes, and (optionally) implementations can be included within this file.

What is a header file?

200

This operator is shorthand for dereferencing an object pointer and then accessing one of its members.

What is -> (or arrow operator)?

200

In order to add an element to this data structure, this command adds it to the very BACK

What is push_back()?

200

When an exception causes execution to leave a try block, this block can handle the error.

What is a catch block?

300

Imagine we had a vector with 30 elements. The index of the 30th element is...?

What is the index 29?

300
This keyword allows a header file to be visible to a specific C++ file, either for implementation purposes or for use in the main file.

What is #include?

300

The new keyword reserves memory in this region.

What is the heap?

300

This function allows you to return the number of elements inside of the data structure.

What is size()?

300

This special type of function calls itself directly, or indirectly to break down problems into smaller, manageable sub problems.

What is Recursion?
400

Imagine we called clear() on a vector or map. These are the expected results of size() and empty()

What is 0 and True?

400

Giving a class several constructors with different parameter lists is called this.

What is constructor overloading?

400

Forgetting to call delete on dynamically allocated memory can cause this problem.

What is a memory leak?

400

This function allows you to completely erase the data structure in it's entirety, removing all elements.

What is clear()?

400

This object-like tool allows a program to move through elements of containers such as vectors and maps.

What is an iterator?

500
This form of parameter references the original variable, is able to modify that variable, and does NOT create a copy of that variable.

What is pass-by-reference?

500

This constructor creates a new object using an existing object of the same class.

What is a copy constructor?

500

Copy constructor, copy assignment operator, and destructor make up this three-part guideline for classes that need special resource handling.

What is the Rule of Three?

500

Imagine we had this vector: {1, 4, 29, 5, 7, 9}. The result of vector.at(3) is...

What is 5?

500

Imagine we had class called TimePeriod. Because it uses a TimePeriod object, it has to explicitly define an addition and subtraction operator, which is called this.

What is operator overloading?

M
e
n
u