[c++]automatic vs dynamic storage
From: ed (nocoo_t2spam_at_yahoo.com
Date: Sat, 13 Mar 2004 21:05:06 GMT
Hi. I was wondering if there are any hard and fast rules to go by
when deciding whether to create an object with automatic storage, or
with dynamic storage.
For instance, I may create an object with automatic storage, in some
in my program. But that object may be passed around all throughout
Maybe something like:
// more stuf ......
MyObj may pass AnotherObj somewhere else. Is this ok? Or is this a
you need to use dynamic storage?
I guess what I'm not clear on is, is AnotherObject still considered to
be in the scope
of myFunc, even though it's being passed around to other parts(and