Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!rutgers!mcnc!palmer From: palmer@mcnc.org (Thomas C. Palmer) Newsgroups: comp.lang.c++ Subject: Problem resizing array of pointer to class Message-ID: <6831@alvin.mcnc.org> Date: 5 Jul 90 14:10:11 GMT Organization: MCNC; RTP, NC Lines: 44 I'm having a problem resizing an array of pointers. I have a class Array that has members: Type** ary; int sz; The constructor allocates the array with: ... ary = new Type*[sz = size]; ... If the array needs to be resized I call the following: void Array::resize(int newsz) { Type** oldary = ary; int i, oldsz = sz; sz = ((newsz != 0) ? newsz : (sz < 2 ? (2) : (sz+sz/2))); ary = new Type*[sz]; for(i=0; i