Quote Originally Posted by wysota View Post
:-)

As you see a and a.array are on the stack and b and b->array are on heap.

Your "example" works because even if "myStruc" is allocated on the stack, its array member will be allocated on the heap. But it doesn't mean that if myStruc is allocated on the heap, array is (or can be) allocated on the stack
Do some google search on "array in stack overflow", or at
http://www.devx.com/tips/Tip/14276