0
I know that using Class obj; I’m storing obj in Stack and with Class* obj = new Class(); I’m storing in Heap. But in practice, what’s the difference?
0
I know that using Class obj; I’m storing obj in Stack and with Class* obj = new Class(); I’m storing in Heap. But in practice, what’s the difference?
Browser other questions tagged c c++ oop
You are not signed in. Login or sign up in order to post.
http://answall.com/q/57006/101 helps as well. In practice the difference is already in the question, this is not theory.
– Maniero
But what’s the practical difference in allocating to Stack or Heap? When I want to allocate to the heap, if I can pass the address of the one in the stack and change by reference?
– Vinicius Dias
If you follow all the links that has in the questions and in the answer there will see all this. It is all answered already. see also: http://answall.com/q/83293/101, http://answall.com/q/56580/101 and http://answall.com/q/120103/101
– Maniero