Is there any way i can delete the partial memory of the pointer.? for example
char *c = new char[1000]; sprintf(c,\"this is it\");
As it can b
Well, allocate another memory block with the precise size required for the data, copy the data there and free the original (exceedingly large) memory block. Done.