L
Lilith
I've only recently started to learn Windows programming using VC++.
It's relatively easy to understand the basics fo attaching functions
to controls but I've been trying to learn Windows from the roots on
down. In looking at source code I'm finding a tendency for some
programmers to declare an object of their application type with a new
and subsequently use the pointer-member-of operator to access the
members of the class object. Considering it was obvious in these
instances that there was only going to be one application object, what
is the point of declaring a pointer and then go through the process of
allocating the object itself rather than simply declaring the object
and forgetting the allocation?
It's relatively easy to understand the basics fo attaching functions
to controls but I've been trying to learn Windows from the roots on
down. In looking at source code I'm finding a tendency for some
programmers to declare an object of their application type with a new
and subsequently use the pointer-member-of operator to access the
members of the class object. Considering it was obvious in these
instances that there was only going to be one application object, what
is the point of declaring a pointer and then go through the process of
allocating the object itself rather than simply declaring the object
and forgetting the allocation?