**fig5_22.txt** /* 1*/ template /* 2*/ void /* 3*/ Dynamic_Hash_Table:: /* 4*/ Rehash( ) /* 5*/ { /* 6*/ Hash_Entry *Old_Cells = The_Cells; /* 7*/ unsigned int Old_Size = H_Size; /* 8*/ Num_Elements_In_Table = 0; /* 9*/ H_Size = Next_Prime( 2 * Old_Size ); /*10*/ Allocate_Cells( ); /*11*/ for( int i = 0; i < Old_Size; i++ ) /*12*/ if( Old_Cells[ i ].Info == Legitimate ) /*13*/ Insert( Old_Cells[ i ].Element ); /*14*/ delete [ ] Old_Cells; /*15*/ }