Counting, without using a Loop

Similar Posts

  • Tower of Hanoi

    The Tower of Hanoi, sometimes called the Tower of Brahma puzzle, is one of the classic problems to look at if you want to learn recursion. This problem is good to understand how recursive solutions are arrived at and how parameters for this recursion are implemented. We look at the solution in another post. The…

  • Function Prototypes

    In previous examples, we’ve had to write our functions above the place where they are called. However, many developers like to place main as their first function they see, so it’s easier to find. Or they may not know the order that the function will be called. C and C++ allow you to define a…

  • |

    Searching Indexs

    Now the idea behind weighted search is nice, but it is complicated, requires several extra calculation steps, and can cause other issues. In a Database, you might have heard about indexing. The idea of finding a way to store a subset of your table which means faster searching. Of course, if you are looking through…

  • Destructors in C++

    We’ve looked at Constructors in C++ to create an object, and building an object with new. However, what happens when we no longer need that object? That’s where a destructor is called. It is built into all objects, and if you don’t define one, a default one will be called for you. The destructor’s job…