22
23 template <class TYP,int anzahl>
24 feld<TYP,anzahl>::~feld() // Destruktor
25
{
26 delete [] puffer;
27 }
28
29 template <class TYP, int anzahl> //Feldzugriff
30
TYP & feld<TYP,anzahl>::operator[] (int index)
31 {
32 if (index < 0 || index
> maxindex)
33 exit(1);
34 return puffer[index];
35 }
36
|
Bild 17-12 Feldtemplate mit Wertparameter |