If definition stands for assigning memory. How come a class definition in C++ has no memory assigned until an object is instantiated.
C++ Class definitions do not assign memory. class
is like typedef
and struct
. Where did you get the idea that "definition stands for assigning memory"? Can you provide a quote or reference?
C++ Object creation (via new
) assigns memory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With