Home
C++
Bitset
Class
Console
Data Structure
Data Type
Deque
Development
File
Function
Generic
Language
List
Map Multimap
Overload
Pointer
Qt
Queue Stack
Set Multiset
STL Algorithms Binary search
STL Algorithms Heap
STL Algorithms Helper
STL Algorithms Iterator
STL Algorithms Merge
STL Algorithms Min Max
STL Algorithms Modifying sequence operations
STL Algorithms Non modifying sequence operations
STL Algorithms Sorting
STL Basics
String
Valarray
Vector
cast « Class « C++
C++
Class
cast
1.
Don't need a cast to go up the inheritance hierarchy
2.
class type-casting
3.
The const_cast operator is used to explicitly override const and/or volatile in a cast.
4.
Use const_cast on a const reference.
5.
The static_cast operator performs a nonpolymorphic cast.
6.
The reinterpret_cast operator converts one type into a fundamentally different type.
7.
The dynamic_cast performs a run-time cast that verifies the validity of a cast.
8.
Replacing typeid with dynamic_cast