5.0 对象数组
int main(void) { Coordinate coord[3]; //栈中实例化 coord[1].m_ix = 10; Coordinate* p = new Coordinate[3];//堆中实例化对象 p[0].m_iY = 20; //p->m_iY = 20; delete[]p; p = NULL; return 0; }
posted on 2019-06-21 16:41 pxxfxxxxx 阅读(126) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 pxxfxxxxx Powered by .NET 9.0 on Kubernetes