New course! Every coder should learn Generative AI!
Try a free lesson+ 2
what for __ int8, __int16, __ int32, __ int64 and __ int128 are needed
9 Answers
+ 2
The numbers tell you, of how many bits the integer consists. So you use bigger integer types if you want to calculate bigger numbers, like factorials and smaller types to save memory (for example to program microcontrollers).
+ 2
But when I used it , it gave error...so can you clearly show one example?
+ 2
Atharva Shirkande
It could be a matter of your compiler...
__int16 etc probably work with visual studio
else you could try #include <cstdint> and then use int16_t instead
+ 2
ok... thanks 😄
+ 1
Quoted from MSDN:
" If its name begins with two underscores (__), a data type is non-standard."
https://msdn.microsoft.com/en-us/library/s3f49ktz.aspx
+ 1
https://code.sololearn.com/cMNK2Ko1k3xc/?ref=app
Atharva Shirkande
+ 1
can we do it for int8_t also?
+ 1
Atharva Shirkande yes, check out my code again
+ 1
Thank you so much😄