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
Not directly. The best you can do in C++ is to make a new copy that's the right size and delete the old one. There's no analog of C's realloc.
realloc