0

C++ casting and type conversion in place

Is it possible to cast a variable in place? this is what I’m going for: char a = 5; cast a to int a = 10000;

11th Sep 2022, 5:40 AM
ITDW
1 Odpowiedź
+ 1
yes, thera 5 types of cast possible in core c++ 1) static cast 2) dynamic cast 3) reinterpret cast 4) const cast 5) cstyle cast - https://en.cppreference.com/w/cpp/language/explicit_cast
11th Sep 2022, 5:44 AM
Prashanth Kumar
Prashanth Kumar - avatar