Lecture 3 - Slide 6 : 27
Examples of casting
A number of concrete illustrations of casting in C++
Examples of static casting in C++.
The compilable parts of the program from above.
Example of dynamic casting in C++.
The compilable parts of the program from above.
Similar C# stuff
dynamic_cast is a predicate - it tests if a pointer is of the appropriate type.
as in C#
Examples of reinterpret_cast.
The compilable parts of the program from above.