Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
1. Using the type conversion functions built into C++ or written by the user. This can be done implicitly, via a C-style cast, via a constructor call, via a static_cast operation.
2. With the conversion of the pointer down the inheritance hierarchy, and special behavior, if this did not work out, through the dynamic_cast operation and the dynamic_pointer_cast function.
3. Considering a piece of memory as a variable of an incompatible type. Through union, const_cast, reinterpret_cast, C-style cast of pointers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question