lundi 23 octobre 2017

Cast int to unsigned int c++ [duplicate]

This question already has an answer here:

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.

Aucun commentaire:

Enregistrer un commentaire