C Programming - Dynamic Pointer Cast vs Dynamic Reference Cast
Only difference is that in case of bast casts to references a suitable handler can be provided.Like the one below
try {
A &a = dynamic_cast < A & >(b); // suppose that this fails
}
catch (bad_cast) {
// do what ever you want
}
Labels: C
About this entry
You’re currently reading “
- Published:
- 1:54 am
- by -
0 Comments (Post a Comment)