Casting in C++

Introduction

Introduction

in c had casting

casting

int value = 1;
float y = (float) value

cpp can also do

static_cast<float>(value)

other options in c++

reinterpret_cast<>()
const_cast<>()
dynamic_cast<>()