생성일: 2022년 12월 11일 오전 1:01
최종 편집 일시: 2022년 12월 14일 오후 12:20
형변환 연산
const int num =20;
int *ptr = (int *)#
int *ptr2 = static_cast<int*>(&num); // 잘못된 캐스팅을 컴파일단에서 잡아준다.
업캐스팅, 다운캐스팅
ex00 Conversion of scalar types
static_cast
ex01 Serialization 직렬화
reinterpret_cast
uintptr_t
reinterpret_cast
직렬화
역직렬화
ex02 Identify real type
dynamic_cast