If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

regarding CTypedPtrArray,moving of array

Well am designing an application in which i am using CTypedPtrArray for saving an pointers of array now at any instant how can i delete any of the value at given index and then move the whole rest of the array,is their any other suggestion rather than moving of complete array........
Please help me...

Re: regarding CTypedPtrArray,moving of array

yeah actually am not well acquainted with CArray<>...i have used this to save records of class that's derived from CObject....wel actually i solved my other problems the only problem am facing is i have to delete the contents of last index of CTypedPtrArray.......am presenting you the code...

Re: regarding CTypedPtrArray,moving of array

It is not really clear what you are trying to do. There is a RemoveAt() member
function that removes an element in the collection at a specified index. (you still
need to take care of deallocating dynamicallt allocated memory)

Re: regarding CTypedPtrArray,moving of array

MFC will reduce the memory allocated by CTypedPtrArray object after you call RemoveAt. You, however, have to free the memory the pointer at the CTypedPtrArray position, you are removing at, points to (since you created your object with new you must now delete it using delete).

Besides, in the code snippet you have posted is absolutely unclear what CTypedPtrArray is and what type of objects you are creating (which pointers are supposed to be set at the CTypedPtrArray)

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.