C++: Difference between revisions

11 bytes removed ,  7 October 2019
Line 91: Line 91:
[https://stackoverflow.com/questions/332030/when-should-static-cast-dynamic-cast-const-cast-and-reinterpret-cast-be-used Types of casts]
[https://stackoverflow.com/questions/332030/when-should-static-cast-dynamic-cast-const-cast-and-reinterpret-cast-be-used Types of casts]
C++ has several types of casts.
C++ has several types of casts.
These are the main ones.
These are the main ones you should use.
* <code>const_cast</code>
* <code>static_cast</code>
* <code>static_cast</code>
* <code>dynamic_cast</code>
* <code>dynamic_cast</code>