For instance, let’s create desktop technological know-how vector class for storing an array with T type points:define TOSTRx x+” ” // macro for showing an object name//+ +//| Vector class for storing T type elements |//+ +template class TArray // constructor for developing desktop technological know-how vector with computing device technology exact array size void TArrayint size // return desktop technology type and amount of knowledge stored in programming TArray type object string Typevoid; ;void OnStart double array double:10 int array int:15 string array string:20Class templates are greatest for developing packing containers gadgets designed for encapsulating other objects of any type. Container gadgets are collections already containing items of one certain type. Usually, working with stored data is instantly built into programming box. For instance, which you could create computing device science class template that doesn’t allow gaining access to an element outdoor programming array, thus averting programming “out of range” vital error. //+ +//| Class for laptop science free access programmers an array aspect |//+ +templateclass TSafeArray // constructor for creating programming array of computer science distinct size void TSafeArrayint size // array size int Sizevoid // change programming array size int Resizeint size,int reserve // release programming array void Erasevoid // operator for having access to programming array element by index T operator; // T type array ;//+ +//| Receiving an element by index |//+ +templateT TSafeArray::operator; //+ +//| Assigning for programming array |//+ +templatevoid TSafeArray::operator=const T andarray=%G”,index,safe rates. close; // index out of doors programming array index=size; PrintFormat”Close=%G”,index,safe rates.