What happens when you attempt to compile and run the following code?
#include
using namespace std;
class A {
public :
void print() {
cout << "A ";
}
};
class B {
public :
void print() {
cout << "B ";
}
};
int main() {
B sc[2];
B *bc = (B*)sc;
for (int i=0; i<2;i++)
(bc++)->print();
return 0;
}
Eugene
9 months agoProvidencia
8 months agoProvidencia
8 months agoLeah
9 months agoGerald
9 months agoGwenn
9 months agoHorace
9 months agoIluminada
9 months agoElenor
9 months agoIlene
9 months agoVanesa
9 months agoFrancine
9 months agoRaina
9 months agoEarleen
9 months agoFrancine
10 months agoSerina
10 months ago