I'm studying class and I dont understand why the scope resolution operator is needed in this code. float v was declared inside the class so then why is A::v needed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
class A {
public:
float v;
float set(float v) {
A::v += 1.0;// line not understand
return v;
}
float set(void) {
A::v = v + 1.0;//here as well
return 0.0;
}
float get(float v) {
v += A::v;//here a swell
return v;
}
};
Put the code you need help with here.