Objects and Pointers

Some of the previous videos and reading have covered the implications of an object owning some dynamically allocated memory.  Mainly, what I'm referring to here is the need for a copy constructor, overloaded assignment operator, and destructor in a … [Continue reading]

Object-Oriented Programming in C++

C++ was originally called "c with classes" meaning that it was everything that the c language was plus the ability to create classes and objects in the language.  I'm sure that you can see the value in creating a higher level construct over and above … [Continue reading]

Arrays of c-strings

There are a lot of use cases in which you deal with a set of strings.  An array of strings seems to be a logical, first-pass choice for storing them.  Because c-strings are basic arrays fundamentally, they are a great topic to use to understand the … [Continue reading]

Memory Management in C++

C++ gives you, the programmer, more fine-grained access to memory than a language like Java.  An old saying goes like this, "To whom much is give, much is expected."  So, because you have more control over memory, you have to take care to handle it … [Continue reading]

It’s Not Nice to Point… But Really, It’s OK.

Pointers are really important to the C and C++ language.  They are actually really important in many different languages whether or not you have direct access to manipulate them. In our on-line gathering yesterday evening, I introduced you to the … [Continue reading]

2 Dimensions are Better than 1, right?

Many problems deal with more than single dimensional data.  At the risk of beating the grade example to pieces, think about the idea of a class having 20 students and 4 exam grades for a semester.  Would it be possible to model this scenario with a … [Continue reading]

Arrays – A Ray of Sunshine for your Programs

Arrays are a foundational data structure in many programming languages, especially those that come from the same genre as c++.  However, different languages treat arrays different, meaning that they have different "features". … [Continue reading]

Design before Coding

In the "real world", it is a rare occurrence that a developer encounters a problem and starts to solve that problem with a blank project.  Often times, a dev is working as part of a much larger contingent of folks on a much more massive software … [Continue reading]

Fun Times with File I/O in C++

You use files every day; don't deny it!  From the perspective of a program that you may write, a file is a way to have persistent storage.  What I mean by this is that the data you put in the file persists beyond the execution of the program.  So, if … [Continue reading]

More of Functions in C++

There are a few things that aren't really covered in the Overland text related to functions - at least not in chapter 5 - that are very important to understand. As a note, I very (very very very) frequently use different terminology for the … [Continue reading]