+ 3

What is the defference between "reinterpret_cast" and "static_cast"? What is the work "static_cast"?

16th Jun 2018, 4:28 PM
Wesam
Wesam - avatar
5 Answers
+ 5
Must watch. This will give you better understanding. https://youtu.be/pWZS1MtxI-A
17th Jun 2018, 1:42 PM
Tanay
Tanay - avatar
+ 3
can you give me example ?
16th Jun 2018, 6:42 PM
Wesam
Wesam - avatar
+ 3
A static_cast keeps the meaning and a reinterpret_cast keeps the bit layout in memory.
17th Jun 2018, 10:58 AM
Timon Paßlick
+ 2
Unlike static_cast but like const_cast, the reinterpret_cast  expression does not compile to any CPU instructions. It is purely a compiler directive which instructs the compiler to treat the sequence of bits
16th Jun 2018, 5:38 PM
Siddhant Giri
Siddhant Giri - avatar
+ 2
by the way only difference in ur question is the spelling "difference"
16th Jun 2018, 5:58 PM
Siddhant Giri
Siddhant Giri - avatar