N
nishit.gupta
Hi
i need some help related to memory allocated through new.
In my code, depending upon some parameter i allocate memory to a
variable dynamically through new.
But due to change in requirement it may happen that i need some more
memory later on. Can it
be done now without changing previous implementation ???
I cant change it to link list my code is a part of some other
projects.
i cant even delete and reallocate new memory as in that case i need to
modify
classes (for copy constructors )......
requirement is :
i initialize a pointer, let say:
i = new class_name*[x];
later on i need i to be (let say ) x + y
so cant i do some more new and add it to previous x?????
as i told i cant delete i or change it to link list....
is their any way to do it????
rgds
i need some help related to memory allocated through new.
In my code, depending upon some parameter i allocate memory to a
variable dynamically through new.
But due to change in requirement it may happen that i need some more
memory later on. Can it
be done now without changing previous implementation ???
I cant change it to link list my code is a part of some other
projects.
i cant even delete and reallocate new memory as in that case i need to
modify
classes (for copy constructors )......
requirement is :
i initialize a pointer, let say:
i = new class_name*[x];
later on i need i to be (let say ) x + y
so cant i do some more new and add it to previous x?????
as i told i cant delete i or change it to link list....
is their any way to do it????
rgds