The delete []array statement gives me an error when I run this program. The error is the attached picture. I have no idea why this is happening. Can anyone help?
Thanks,
Joe
---------
int main()
{
int *array,size=10,i=0;
array= new int[size];
if (array!=NULL){
while (i<=size)
{
array[i]=i+10;
cout << array[i] << endl;
i++;
}
delete []array;
};
return 0;
}



LinkBack URL
About LinkBacks


