Hello!
First of all, please excuse me for my bad english!
Im having the following problem.
In some function, i return a dynamic array of int with some size. In the same function, in other part (is recursive) I get that array with a pointer but with no size specified. For example
int * t = function(...);
I know in that part what size my returned array is, but i dont declare it here. Then i use this pointer to do some operations, and finally, i want to delete the entire array, not only the t pointer... i don't know if im explaining very good.. :S
I dont know how to do this, in order to don't waste memory in every call... i think it's with pointer arimethic or something, but i dont know about that... can you help me?? Cause here i cant use the delete[] t instruction. Thanks in advance!!