What will happen as a result of the dynamic_cast conversion attempt?
#include <iostream>
using namespace std;

class A{
public:
	virtual ~A() {}
};

class B: public A{ };

int main(){
	A a;
	try{
		B & b = dynamic_cast<b &>(a);
	}catch(...){
	}
	return 0;
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes