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++: Copy and Swap
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++: Pascal’s Triangle
The task is to print out the first 15 Catalan numbers by extracting them from Pascal's triangle. This enables calculation of Catalan Numbers using onl
Continue ReadingC++: Forest Fire
Implement the Drossel and Schwabl definition of the forest-fire model. It is basically a 2D cellular automaton where each cell can be in three dist
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 Reading
 
 
 
 
 
				
 
 
