Question: Please explain: What has been achieved in terms of functionality, i.e what action/call or operation can I perform after dynamic casting? Do Base*b or Derived*
Please explain:
What has been achieved in terms of functionality, i.e what action/call or operation can I perform after dynamic casting?
Do Base*b or Derived* d have become more capable in any sense?
Please explain any thing that I is achieved after dynamic cast and was not possible otherwise.

code for ref:
#include
using namespace std;
class Base {
public:
virtual void print() {}
};
class Derived : public Base {
public:
void print2(){
cout
}
};
int main() {
Base* b = new Derived;
Derived* d = dynamic_cast
if (d != NULL) {
cout
}
else {
cout
}
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
