Originally posted by: notfred
Is that the entire program, what line # do you get an error on?
here's the entire program if you feel like taking a look:
Text file with a PNG extension
This is the assignment:
Design an array class that will accept longs, floats, and doubles.
The class should create an array of 25 values of a type to be
determined when the class is instantiated.
Provide methods that will allow the user to do the following:
1- view entire array,
2- view any particular element (for example, array[3], etc), and
3- change the value of any element.
Instantiate a class of each type and fill the array with values using
the random and seed functions .
Using inheritance, create a subclass that will allow the user to
clear the array (set all values to null) and, then, repopulate the
array if the user desires.
Ask the user if the array is to be repopulated. If the answer is yes,
then, use random and srand functions to repopulate. Have the subclass
work on the same type values as it's base class.
NO global primitive variables will be allowed. All primitives must be
of local scope.