What are the basic rules and idioms for operator overloading in C++? Note: The answers were given in a specific order, but since many users sort an
Continue ReadingC++: When should static_cast, dynamic_cast, const_cast and reinterpret_cast be used?
What are the proper uses of: static_cast dynamic_cast const_cast reinterpret_cast C-style cast (type)value Function-style cast typ
Continue ReadingC++: Jensen’s Device
This task is an exercise in call by name. Jensen's Device is a computer programming technique devised by Danish computer scientist Jørn Jensen aft
Continue ReadingC++: Rational Number Arithmetic
The objective of this task is to create a reasonably complete implementation of rational arithmetic in the particular language using the idioms of the
Continue ReadingC++: GUI Enabling/Disabling of Controls
In addition to fundamental GUI component interaction, an application should dynamically enable and disable GUI components, to give some guidance to th
Continue ReadingC++: What are the differences between a pointer variable and a reference variable in C++?
I know references are syntactic sugar, so code is easier to read and write. But what are the differences? Summary from answers and links bel
Continue ReadingC++: Black Scholes Put Option Gamma
// Calculate the Black Scholes European put option Gamma double BS_Put_Option_Gamma(double S, double K, double r, double v, double T) // Parame
Continue ReadingC++: Assertions
Assertions are a way of breaking out of code when there is an error or an unexpected input. Some languages throw exceptions and some treat it as a bre
Continue ReadingC++ Questions
[pt_view id="6491efea00"]
Continue ReadingC++: Template Conditional Structures
This page lists the conditional structures offered by different programming languages. Common conditional structures are if-then-else and switch. Tem
Continue Reading




