CArray::RemoveAt() causes Unhandled exception
-
In the program, there are two CArrays. One CArray is having another CArray in it. Sometimes unhandled exception happens in RemoveAt() of outer CArray. The code looks like:
CArray_Outer[i]->CArray_Inner.RemoveAll(); CArray_Outer.RemoveAt(i); // <-- Here the Exception happens
Is it standard way to delete some item in CArray? Thanks, Suman-- "Programming is an art that fights back!"
-
In the program, there are two CArrays. One CArray is having another CArray in it. Sometimes unhandled exception happens in RemoveAt() of outer CArray. The code looks like:
CArray_Outer[i]->CArray_Inner.RemoveAll(); CArray_Outer.RemoveAt(i); // <-- Here the Exception happens
Is it standard way to delete some item in CArray? Thanks, Suman-- "Programming is an art that fights back!"
What is the exception and what is the code causing it? Are you doing that code in a loop? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: