char myWord[20];
I want to delete last 10 chars of this array, I mean freeing the memory thats being used by last 10 chars. Is there anyway to do this ?
Heres an example function for substring where it might be useful.
str& substring(uint Start, uint Count){
for(uint x=0; x<Count; x++){
mString[x] = mString[x+Start];
}
// SOMEHOW FREE MEMORY OF mString FROM [Start+Count] TO [mLength]
mLength = Count;
return *this;
}
malloc()to allocate your memory dynamically, you can e.g. userealloc()to reduce/enlarge your array.