What happens when you attempt to compile and run the following code?
#include
#include
using namespace std;
class A {
int x;
protected:
int y;
public:
int z;
};
class B : public A {
string name;
public:
void set() {
y = 2;
z = 3;
}
void Print() { cout << y << z; }
};
int main () {
B b;
b.set();
b.Print();
return 0;
}
Leslee
1 months agoTherese
7 days agoVi
1 months agoAshley
2 months agoElvera
2 days agoCristina
8 days agoHaley
9 days agoLaura
15 days agoTruman
16 days agoTamra
20 days agoJerry
2 months agoStephen
2 months agoBernadine
2 months agoAdria
2 months agoAlesia
2 months ago