Programming Examples

In this section I'll show you a little of what I have programmed in the past.

The C++ code examples given on this page were written by John O’Leske. Please do not take the code and use it as your own without my permission. I can always write more code, but if you make a habit of taking someone else’s code and using it as your own, you won’t be able to.

Arrays of Templated Function Pointers

This class was a random challenge that a student game me. he was looking for a way to pass an array of function pointers to functions that take templated parameters. This was an interesting idea so I worked though it with him and here it is for anyone else to view if they would like to

See and explanation of this class here


Big bits

A data structure to simulate a very long sequence of bits with bitwise functionality. Originally this arrays purpose was going to used for testing 2d collision between objects via the bitwise & operator and bit arrays that contain the collision data of the objects. If you would look to use this type of structure in code you are working on I would however suggest working with the windows stl BitArray class as it is more efficient.

See and explanation of this class here


Graph class

This is my personal implementation of a templated graph class. The graph class has quickly become one of my favorite data structures over the last few years. I have used this class for a few projects now and have been adding new functionality to it each time to handle new challenges. At this point it is a fairly robust implementation.

See and explanation of this class here