They told me that I should use size_tit whenever I need 32bit unsigned int, I don’t understand why, but I think it has something to do with it, if someone compiles a program on a 16 or 64 bit machine, it unsigned intwill become 16 or 64 bits, but size_twill not, but why is it not? and how can i get the bit sizes exactly what i want?
So where is the list, which data type to use and when? for example, is there an size_talternative unsigned short? or for 32bit int? etc. How can I be sure that my data types have as many bits as I chose in the first place, and I don’t have to worry about different bit sizes on other machines?
Basically, I care more about the memory used, and not about the maximum speed that I get from doubling the memory usage, because I don't have much RAM. So I want to stop worrying if everything falls apart, if my program is compiled on a machine that is not 32bit. At the moment, ive is size_talways used when I want it to be 32 bits, but for shortI do not know what to do. Someone is helping me clear my head.
On the other hand: if I need a 64-bit variable, can I use it on a 32-bit machine successfully? and what is the name of the data type (if I want it to always be 64 bits)?
source
share