代码部分跟老师的一样,编译中断
// ConsoleApplication12.cpp : 定义控制台应用程序的入口点。
//对象数组
#include "stdafx.h"
#include "Coordinate.h"
using namespace std;
intmain()
{
Coordinate coord[3];
coord[0].m_iX=10;
coord[0].m_iY=10;
Coordinate *p=new Coordinate[3];
p[0].m_iX=11;
p->m_iY=21;
p++;//p=p+1 p=+1
p->m_iX=12;
p[0].m_iY=22;
p[1].m_iY=32;
p++;
p->m_iX=31;
delete []p;
p= NULL;
for (int i = 0; i < 3; i++)
{
cout<<"m_iX: "<<coord[i].m_iX<<endl;
cout<<"m_iX: "<<coord[i].m_iY<<endl;
}
for (int j = 0; j < 3; j++)
{
cout<<"p_x"<<p->m_iX<<endl;
cout<<"p_x"<<p->m_iY<<endl;
p--;
}
p++;
delete []p;//不加中括号仔细够了第一个函数
p=NULL;
system("pause");
return 0;
}编译通不过,中断



这个怎么解决呢?