Expert
What are the instructions that are forbidden in this example ?
class A {
protected: int x;
private: int y;
};
class B : public A {
public:
void f(B otherB, A otherA, int z) {
x = z; //1
y = z; //2
x += otherB.x; //3
x += otherB.y; //4
x += otherA.x; //5
}
};
Author: SamuelStatus: PublishedQuestion passed 251 times
Edit
-1
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about C++