The copy-and-swap idiom identifies that we can implement a classes copy/move assignment operators in terms of its copy/move constructor and achieve st
Continue ReadingC++: Arena Storage Pool
Dynamically allocated objects take their memory from a heap. The memory for an object is provided by an allocator which maintains the storage pool use
Continue ReadingC++: While Loops
Start an integer value at 1024. Loop while it is greater than 0. Print the value (with a newline) and divide it by two each time through the loop.
Continue ReadingC++: Evaluate Binomial Coefficients
This programming task, is to calculate ANY binomial coefficient. However, it has to be able to output , which is 10. This formula is recommended
Continue ReadingC++: Catch an Exception Thrown in a Nested Call
Show how to create a user-defined exception and show how to catch an exception raised from several nested calls away. Create two user-defined exc
Continue ReadingC++: Maze Generation
Generate and show a maze, using the simple Depth-first search algorithm. Start at a random cell. Mark the current cell as visited, and get a l
Continue ReadingC++: Factors of an Integer
Compute the factors of a positive integer. These factors are the positive integers by which the number being factored can be divided to yield a positi
Continue ReadingC++: Bitmap
Show a basic storage type to handle a simple RGB raster graphics image, and some primitive associated functions. If possible provide a function to
Continue ReadingC++: Magic Squares of Odd Order
A magic square is an square matrix whose numbers (usually integers) consist of consecutive numbers arranged so that the sum of each row and column, a
Continue ReadingC++: Loop Breaks
Show a loop which prints random numbers (each number newly generated each loop) from 0 to 19 (inclusive). If a number is 10, stop the loop after print
Continue Reading




