After doing some Googling on casting, I've read a couple places that say something like this: int8_t, int16_t, int32_t, int64_t described as char, short int, int, and long long int respectively. What happened to "long?" I always thought 16 bit was int and 32 bit was long? I need to get this part straight before going on to the next question... type casting. I've been putting the UL suffix after some of my low value literals when assigning the value to a uint32_t. But if the variable is considered an int, what is the UL suffix doing (ex. uint32_t = 44UL;).
I thought I had this figured out to use "static_cast" operator for casting the uintn_t types, but then on another site I read that static_cast is ONLY used in C++. Right now, I'm trying to stick with straight C. I think this is at least partly where I'm getting confused. A lot of sites tend to combine C and C++ and it isn't always clear to me which one applies. Plus, the different versions(?) vary from one to the next. Is it C99? that started using the "int32_t" types? For a newbie like me it gets complicated. I searched the tutorials for casting and didn't see any pertinent titles there ([TUT] casting). I'm sure there's some guide somewhere that can break this down. I'd appreciate a link if anyone can recommend a good source.