What’s the difference between these two statements?
ob.A::ar[0] = 200;
ob.ar[0] = 200;
where ob is an object of class A
class A
{
public:
int *ar;
A()
{
ar = new int[100];
}
};
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.
In this case there is no difference.
This notation:
obj.Class::memberis only to solve the ambiguities coming from inheritance: