hi all,
is uint32 ( or uint32_t ) a built in type or a typedef ?.
If it's a typedef ( or a macro ) where is it defined ?
Thank you.
hi all,
is uint32 ( or uint32_t ) a built in type or a typedef ?.
If it's a typedef ( or a macro ) where is it defined ?
Thank you.
First there was God. He was quite lonely, so he created Dennis.
Dennis was unimpressed with God.
So, . . . God created Brian..........Khan Klatt
http://www.clifford.at/fun/GOD
Edit, try stdint.h for C99.
Quzah.
Hope is the first step on the road to disappointment.
Is this not defined for win32 ?
( it was a typedef in stdint.h )
First there was God. He was quite lonely, so he created Dennis.
Dennis was unimpressed with God.
So, . . . God created Brian..........Khan Klatt
http://www.clifford.at/fun/GOD
Huh? C99 is anywhere. If you have a standards-conforming C99 compiler, you shouldn't need to worry about platform dependencies.
They're not standard. Or at least they weren't before C99. C99 I believe may optionally have them.This is from C99.7.18.1.1 Exact-width integer types
1 The typedef name intN_t designates a signed integer type with width N, no padding
bits, and a two’s complement representation. Thus, int8_t denotes a signed integer
type with a width of exactly 8 bits.
2 The typedef name uintN_t designates an unsigned integer type with width N. Thus,
uint24_t denotes an unsigned integer type with a width of exactly 24 bits.
3 These types are optional. However, if an implementation provides integer types with
widths of 8, 16, 32, or 64 bits, it shall define the corresponding typedef names.
Quzah.
Hope is the first step on the road to disappointment.
They're not everywhere. If you plan to compile for odd platforms, you should probably check and provide for the odd case. I wish they were more places, uint32_t and friends are darn useful.
They're usually located in stdint.h. (I've yet to see them elsewhere.) My Windows box has them, and Linux has them. (Or mine does, at least.) Macs, I should hope, have them. However, OS/2 using gcc3.2.1 apperantly does not. (It has no stdint.h file for me. Watcom does I think.) The robot I've coded for does not have an stdint.h.
quzah - reading that 3rd item, the part about "if an implemenation provides integer types with widths of 8..." would mandate it for most compilers, would it not? I have never seen a situation where 8 * sizeof(int) did not equal one of the listed numbers, and would that not cause that However-clause to take effect?
long time; /* know C? */
Unprecedented performance: Nothing ever ran this slow before.
Any sufficiently advanced bug is indistinguishable from a feature.
Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
The best way to accelerate an IBM is at 9.8 m/s/s.
recursion (re - cur' - zhun) n. 1. (see recursion)
I read it as:
1 - the typedefname ifooN will be exactly N bits wide, no padding is allowed
2 - the typedefname ufooN will be exactly N bites wide, and unsigned
3 - regarding the above, these fooN types are optional, but, if they're there, they will be typedefed appropriately to their respective type and size
Quzah.
Hope is the first step on the road to disappointment.
Perhaps the best way to go then is typedef your own?