0

What is the best casting method to use when casting int to uint32_t?

Should I use (uint32_t)num, or reinterpret_cast<uint32_t>(num), or static_cast<uint32_t>(num)? (Or something else)?

I know that there are many explanations out there regards the different casting types, but I want to ask specifically about primitive types.

ElyashivLavi
  • 1,681
  • 3
  • 22
  • 33

0 Answers0