Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!cs.utexas.edu!cse!texas!manohar From: manohar@csl.dl.nec.com (Mun o her) Newsgroups: comp.lang.c++ Subject: How to get the functionality of realloc() in C++ ? Message-ID: <1991May13.191807.29295@csl.dl.nec.com> Date: 13 May 91 19:18:07 GMT Sender: manohar@csl.dl.nec.com (Mun o her) Organization: NEC America, C & C Software Development Lab Lines: 22 How to get the functionality of 'realloc()' in C++ ? Note : realloc() is used to change the size of the memory. The problem I have is as follows :- /** a part of prog */ int i=0, data_func(); int *pt = new int[50]; while(1){ pt[i++] = data_func(); <.... whenever the the array is filled up .... I want the array to double in size. this is done using realloc() in C programs... realloc(pt,100) > } Pardon me if this question is too trivial ! -- My Life is like a boat in a dry river. I didnot want to drag the boat out, I wanted to give it a river. ----Boris Pasternak's(of Dr. Zhivago's fame) letter to Mayor Kowaski Manohar S. Gudavalli ||Internet: manohar@csl.dl.nec.com