do************@gmail.com wrote:
Ok,
pX = new Stuff N];
Is dynamically created.
OK.
what about
Stuff x [N]; ?
Firstly, it is important to keep in mind that the notion of being "created"
(they way you use it) applies only to object _definitions_ or dynamic allocations.
Secondly, the answer depends on the context. If you write the above as a
_definition_ in local scope, then it has automatic storage duration, i.e. you
can call it "automatically created". In namespace scope it would have static
storage duration, i.e. it is "statically created".
I can't call it stack allocation because it may be in a class, which
gets dynamically allocated.
That's a completely and significantly different situation. If the above is
written in a class definition, then it is a _declaration_ of a class member
that, which is _not_ _a_ _definition_. The notion of being "created" does not
apply in this case at all. It is not created yet, neither dynamically nor in any
other fashion.
--
Bets regards,
Andrey Tarasevich