Multiple inheritance allows to specify that one class is a subclass of several other classes. Some languages allow multiple inheritance for arbitrary classes, others restrict it to interfaces, some don’t […]
Continue ReadingC++: Loop Over Multiple Arrays Simultaneously
Loop over multiple arrays (or lists or tuples or whatever they’re called in your language) and print the ith element of each. Use your language’s “for each” loop if it […]
Continue ReadingC++: Multiple Distinct Objects
Create a sequence (array, list, whatever) consisting of n distinct, initialized items of the same type. n should be determined at runtime. By distinct we mean that if they are […]
Continue Reading