For example, x is static in class's definition.
I should use x in this way:
class_name::x; rather than instance_of_class.x;
My question is, is the latter one also legal? Or just not correct?
Thanks.
It is legal and correct, but the general consensus is to use the scope resolution operator.
class_name::x
rather than
instance.x
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