Base vs Derived Classes

One of the cool things about object oriented programming is that you can derive a class from an existing class. this allows you to have most of the class built from an existing class, and not need to rewrite the whole class, only the new parts. Additionally, if the original class, called the base class…

Regular Expressions

Regular Expressions, often called RegEx, is a sequence of characters that defines a search pattern to run against another string of data. This is often used to perform a find and replace or check for validation. Different languages apply regular expressions differently. The strictest use the full range of special characters and commands, while others…

Styling Tables

We’ve already looked at styling rows within a table, however, you can style more. By default a table doesn’t have any borders, color, or anything else. Luckily, like all HTML elements, you can apply styles to your elements. And since a table is made up of a lot of elements, you can apply styles to…

Operator Overloading

C++ allows you to define functions for operators, this is called operator overloading. Now why would you need to do that? Well, consider the Circle class we defined earlier. Let’s say I needed to compare two circles to see which one was larger, normally I’d write something like: The problem is, C++ has know way…

The Vector Class

Using arrays to store a collection of variables, even objects, if very beneficial. However, it does have some limitations given that arrays are of a fixed size, and cannot shrink or grow with use. This means you either run out of space after a set of time, or you waste a lot of space as…