Midterm Exam 2/Midterm 2.cpp
void HugeInteger::shrink_to_fit() {
  int *buffer = new int[size];
  for (unsigned int i = 0; i < size; i++)
    buffer[i] = elems[i];
  delete[] elems;
  elems = buffer;
}
// request the current object to reduce its array to fit its size
request the current object to reduce its array to fit its size
request the current object to reduce its array to fit its size
void HugeInteger::shrink_to_fit() {
  int *buffer = new int[size];
  for (unsigned int i = 0; i < size; i++)
    buffer[i] = elems[i];
  delete[] elems;
  elems = buffer;
}
void HugeInteger :: shrink_to_fit ( ) { int * buffer = new int [ size ] ; for ( unsigned int i = 0 ; i < size ; i ++ ) buffer [ i ] = elems [ i ] ; delete [ ] elems ; elems = buffer ; }
request the current object to reduce its array to fit its size
request the current object to reduce its array to fit its size