Hey i have a question regarding pointers
i have a class
1 2 3 4 5 6 7 8 9
class MyClass
{
...
};
MyClass *c[50] = {NULL};
for( int i=0; i<50; i++ )
c[i] = new MyClass( );
and i can access all the instances of c[]
by doing
for( int i=0; i<50; i++ )
c[i]->Something();
but now i need to delete for example c[10]
so i use
delete c[10];
my question is how do i access all the other instance os c[]
is sequencial or not?
i want to use a for loop
but it cant check for the instances that was deleted
how can i do that???
was i clear?? i dont know how to explain properly
for example i want to use
1 2
for( int i=0; i<49; i++ )
c[i]->Something();
but i dont want it to check for the deleted instance o c[], and there could be multiple deleted instances