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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is legal and correct, but the general consensus is to use the scope resolution operator.
rather than