Search

15.5 — Exceptions, classes, and inheritance

Exceptions and member functions

Up to this point in the tutorial, you’ve only seen exceptions used in non-member functions. However, exceptions are equally useful in member functions, and even moreso in overloaded operators. Consider the following overloaded [] operator as part of a simple integer array class:

Although this function will work great as . . . → Read More: 15.5 — Exceptions, classes, and inheritance

14.5 — Class template specialization

In the previous lesson on template specialization, we saw how it was possible to specialize member functions of a template class in order to provide different functionality for specific data types. As it turns out, it is not only possible to specialize member functions of a template class, it is also possible to specialize an . . . → Read More: 14.5 — Class template specialization