Hamming numbers are numbers of the form . Hamming numbers are also known as ugly numbers and also 5-smooth numbers (numbers whose prime div

Continue Reading## C++: Multiple Inheritance

Multiple inheritance allows to specify that one class is a subclass of several other classes. Some languages allow multiple inheritance for arbitrary

Continue Reading## C++: Black Scholes Put Option Vega

// Calculate the Black Scholes European put option Vega double BS_Put_Option_Vega(double S, double K, double r, double v, double T) // Parameter

Continue Reading## Free C++ Books

1. Fundamentals of Programming C++ (Richard L. Halterman) 2. C++ Annotations (Frank B. Brokken) 3. The C++ Hackers Guide (Steve Oualline)

Continue Reading## C++: Random Number Generator

Rule 30 is considered to be chaotic enough to generate good pseudo-random numbers. As a matter of fact, rule 30 is used by the Mathematica software fo

Continue Reading## C++: Multifactorial

The factorial of a number, written as n! is defined as n! = n(n − 1)(n − 2)...(2)(1) A generalization of this is the multifactorials where:

Continue Reading## C++: Simple Moving Average

Computing the simple moving average of a series of numbers. The task is to: Create a stateful function/class/instance that takes a period and

Continue Reading## Why Is Char[] Preferred Over String for Passwords?

In Swing, the password field has a getPassword() (returns char[]) method instead of the usual getText() (returns String) method. Similarly, I have com

Continue Reading## C++: GUI Component Interaction

Almost every application needs to communicate with the user in some way. Therefore, a substantial part of the code deals with the interaction of progr

Continue Reading## C++: Matrix Exponentiation Operator

Most programming languages have a built-in implementation of exponentiation for integers and reals only. Demonstrate how to implement matrix expone

Continue Reading