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
2 months agoElli
4 days agoCarissa
5 days agoTherese
22 days agoVi
2 months agoAshley
2 months agoElvera
17 days agoCristina
23 days agoHaley
24 days agoLaura
30 days agoTruman
1 months agoTamra
1 months agoJerry
2 months agoStephen
2 months agoBernadine
2 months agoAdria
2 months agoAlesia
2 months ago