G Guest Jul 21, 2006 #1 Im wondering how & where the memory is allocating for int i; and int i=new int(); Thanks, Veera.
S Sericinus hunter Jul 21, 2006 #2 veera said: Im wondering how & where the memory is allocating for int i; and int i=new int(); Click to expand... On the stack. In latter case i is initialized with zero.
veera said: Im wondering how & where the memory is allocating for int i; and int i=new int(); Click to expand... On the stack. In latter case i is initialized with zero.
M Michael D. Ober Jul 21, 2006 #3 Or, if i is a member variable of a class, it will be in the heap, but relative to the base address of the object. Mike.
Or, if i is a member variable of a class, it will be in the heap, but relative to the base address of the object. Mike.