Create and display a dragon curve fractal. (You may either display the curve directly or write it to an image file.) This program will generate
Continue ReadingC++: Copy a Range of Elements
On line 7, we create a std::vector<int> called source containing a sequence of values that we wish to copy. On line 9, we have another std::v
Continue ReadingC++: Classes
In object-oriented programming class is a set (a transitive closure) of types bound by the relation of inheritance. It is said that all types derived
Continue ReadingC++: Linear Congruential Generator
The linear congruential generator is a very simple example of a random number generator. All linear congruential generators use this formula:
Continue ReadingC++: Break OO Privacy
Show how to access private or protected members of a class in an object-oriented language from outside an instance of the class, without calling non-p
Continue ReadingC++ Interview Questions
C++: Integer Sequence
Create a program that, when run, would display all integers from 1 to ∞ (or any relevant implementation limit), in sequence (i.e. 1, 2, 3, 4, etc) i
Continue ReadingC++: Maze Solving
For a maze generated by this task, write a function that finds (and displays) the shortest path between two cells. Note that because these mazes are g
Continue ReadingC++: Combinations
Given non-negative integers m and n, generate all size m combinations of the integers from 0 to n-1 in sorted order (each combination is sorted and th
Continue ReadingC++: Greatest Element of a List
Create a function that returns the maximum value in a provided set of values, where the number of values may not be known until runtime. This will
Continue Reading