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
6 months agoProvidencia
5 months agoProvidencia
6 months agoLeah
7 months agoGerald
6 months agoGwenn
6 months agoHorace
6 months agoIluminada
6 months agoElenor
6 months agoIlene
7 months agoVanesa
7 months agoFrancine
7 months agoRaina
6 months agoEarleen
6 months agoFrancine
7 months agoSerina
7 months ago