So on the myprogramminglab there is a problem but i am stumped on
Basically it is an exception handling problem
Assume the existence of a class RangeException, with a constructor that accepts minimum, maximum and violating integer values (in that order).
Write a function, void verify(int min, int max) that reads in integers from the standard input and compares them against its two parameters . As long as the numbers are between min and max (inclusively), the function continues to read in values . If an input value is encountered that is less than min or greater than max, the function throws a RangeException with the min and max values , and the violating (i.e. out of range) input.
so im assuming we start of with
void verify (int min, int max)
{
int input;
cin >> input;
if (input < min || input > max)
throw new RangeException (Min, Max)
}
so its suppose to be like this?
int input;
while (cin >> input)
{
void verify (int min, int max)
{
if (input < min || input > max)
throw new RangeException (min, max);
}
}