a C question# Programming - 葵花宝典h*q2006-10-19 07:101 楼class Object{ … }Object *ptr;1. ptr = new Object;2. Object o; ptr = &o;What's the difference b/w 1 and 2?
N*n2006-10-19 07:102 楼1 on heap, 2 on stack. So don't call delete on 2 or it will suck.【在 h******q 的大作中提到】: class Object{ … }: Object *ptr;: 1. ptr = new Object;: 2. Object o; ptr = &o;: What's the difference b/w 1 and 2?
S*t2006-10-19 07:103 楼heap/stack【在 h******q 的大作中提到】: class Object{ … }: Object *ptr;: 1. ptr = new Object;: 2. Object o; ptr = &o;: What's the difference b/w 1 and 2?