Seal the matrix
i have to seal the matrix starting from the row where the sum of the elements is an even number
1 2 3 4 5 6
|
for(i=0;i<n;i++)
{
s=0; for(j=0;j<k;j++) s+=p[i][j];
if(s%2==0) { delete[] p[i]; p[i]=NULL;
for(m=i;m<n-1;m++) p[m]=p[m+1]; n--; break; }
}
|
do i have to white p[i]=NULL after deleting it?
Try getting in contact with Neo, he knows a lot about the matrix. To my knowledge, you do not have to set it to NULL.
Topic archived. No new replies allowed.