can any one tell me :
in c++ new operator uses heap or stack or both???
new operator in cpp uses heap or stack
Page 1 of 12 Replies - 4624 Views - Last Post: 07 March 2008 - 06:46 AM
Replies To: new operator in cpp uses heap or stack
#2
Re: new operator in cpp uses heap or stack
Posted 06 March 2008 - 11:19 AM
When you use the new keyword you are putting it on the heap. The heap is a large chunk of memory where objects (which can be big in size) reside. The stack is for simple data types like simple integers, chars etc.
#3
Re: new operator in cpp uses heap or stack
Posted 07 March 2008 - 06:46 AM
Thanks Martyr2 for solving my query..... i thot that heap n stack both can be used when we use new operator
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|