Binary Search is a method to search through a sorted container in order to find a particular value. Remember that one “Guess the Number” game? Let’s look at the following scenario by applying the Binary Search algorithm in order for you to understand how Binary Search works. The Guessing Game Pick a number from 0 Full Article…
Bubble Sort C++
Bubble Sort Algorithm Bubble sort is the most primitive sorting algorithm. It simply iterates through a list and compares two elements and swaps them to put them in order. It repeats this process until no more swaps are made. Why Bubble Sort you may ask? You can think of the algorithm as “bubbling” the largest Full Article…
Fibonacci in C++
Fibonacci is a well known number sequence that models the growth of a rabbit population amongst other things found in nature. The Fibonacci Numbers Sequence Below is the Fibonacci numbers computed up to the 11th term. 0 1 2 3 4 5 6 7 8 9 10 11 0 1 1 2 3 5 8 Full Article…
Introduction to Classes
C++ provides you with the int, double, string and other data types, have you ever wanted to make your own? As in, create a data type that stores maybe information relevant to a student, building, or even a simple person? You might have also encountered something like a vector. Maybe you want to create something Full Article…
Programmer’s Notepad
An excellent alternative to Notepad, Programmer’s Notepad offers a versatile programming environment. Programmer’s Notepad Features Programmer’s Notepad allows you to create multiple file types and provides syntax highlighting for a great variety of languages such as C++, PHP, HTML, and so much more. You can also create and manage projects. You can open multiple files Full Article…
Advanced Control Flow – Switch Statements
A switch statement allows you to control the flow of your program similar to if and else statements, but can be easier for the user to understand. The Switch Statement The structure of a switch statement is the following: switch(expression) { case : statements break; case : statements break; //More cases… default : statements }
How to modify and run our source code for OpenGL/SDL projects
Wondering how to modify or run our source code for our OpenGL/SDL projects in order to start editing and learning how to make video games? No worry. Below, I’ll run you through the 3 steps in order to do so. (Yes, your heard it right, simply 3). Setting up your enviornment Step 1 First things Full Article…
