Упражнение 14
Обработка на
изключения
Задача 1: (Big C++: Exercise P17.4. )
Enhance the List class of Chapter
12 to throw an exception whenever an error condition occurs. Use
exception specifications for all functions.
Задача 2:
Create a template definition for a fixed-size array class.The
declaration
Array<int, 10> data;
should create an array of 10 integer values. Override the subscript
operator to provide access to the elements. However, your class
should throw an exception if an attempt is made an access to the
element thru out of range index.