Like many other software engineers out there, I love XKCD so whenever Randall publishes a comic with something computationally interesting I like to take a stab at it. Friday's comic

MGCBasic is my implementation of the BASIC programming language. Written in C++ and sporting an REPL-like BASIC environment re

Anyone who has ever had the pleasure of working with 'C style' strings aka NULL terminated character arrays. Has at some point stopped and remarked about the terrible choice of implementation when it came to representing string

UPDATE: As of 2024 I recommend using the algorithms outlined in this post instead.

Many newer object oriented languages such as Java and Swift have a dedicated interface type for defining the methods of a superclass. C++ does not. What C++ does provide is purely virtual classes, which function in ess