0

Sizeof int

Why there is information that int takes 2 bytes, when code returns 4 ?

30th Aug 2017, 5:52 PM
Tomasz Kryłowski
Tomasz Kryłowski - avatar
5 Respostas
+ 5
To work around that confusion, sample codes from many vendors (like Microsoft) will use CONSTANT_LITERALS to refer to the data type being used. The idea is, if you use a library that loads those literals correctly, then use the literals in your own code, you don't have to worry about it so much.
30th Aug 2017, 8:37 PM
Kirk Schafer
Kirk Schafer - avatar
+ 2
Thank you for your answers
31st Aug 2017, 3:37 AM
Tomasz Kryłowski
Tomasz Kryłowski - avatar