4.2 — Void

Void is the easiest of the data types to explain. Basically, means “no type”! Void is our first example of an incomplete type. An incomplete type is a type that has been declared but not yet defined. The compiler knows about the existence of such types, but does not have …

2.4 — Introduction to function parameters and arguments

In the previous lesson, we learned that we could have a function return a value back to the function’s caller. We used that to create a modular getValueFromUser function that we used in this program: #include <iostream> int getValueFromUser() { std::cout << “Enter an integer: “; int input{}; std::cin >> …

B.1 — Introduction to C++11

What is C++11? On August 12, 2011, the ISO (International Organization for Standardization) approved a new version of C++, called C++11. C++11 adds a whole new set of features to the C++ language! Use of these new features is entirely optional — but you will undoubtedly find some of them …

6.x — Chapter 6 summary and quiz

Always use parentheses to disambiguate the precedence of operators if there is any question or opportunity for confusion. The arithmetic operators all work like they do in normal mathematics. The remainder (%) operator returns the remainder from an integer division. The increment and decrement operators can be used to easily …

21.4 — STL algorithms overview

In addition to container classes and iterators, STL also provides a number of generic algorithms for working with the elements of the container classes. These allow you to do things like search, sort, insert, reorder, remove, and copy elements of the container class. Note that algorithms are implemented as functions …

21.3 — STL iterators overview

An Iterator is an object that can traverse (iterate over) a container class without the user having to know how the container is implemented. With many classes (particularly lists and the associative classes), iterators are the primary way elements of these classes are accessed. An iterator is best visualized as …

21.2 — STL containers overview

By far the most commonly used functionality of the STL library are the STL container classes. If you need a quick refresher on container classes, check out lesson . The STL contains many different container classes that can be used in different situations. Generally speaking, the container classes fall into …