Type conversion operator

· Dynamic_cast: up-conversion allows the object type that allows the base class to the derived class conversion, but not the base class to the derived class conversion, otherwise a null pointer
· const_cast: for eliminating limit const
· static_cast: conversion of the same type, or permit up down conversion, enumeration and shaping can be interchangeable
· reinterpret_cast: slightly

Guess you like

Origin www.cnblogs.com/chendeqiang/p/11483411.html