K
Kyle Kolander
I recently looked over the faq item relating to fundamental type sizes:
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.5
and was a bit surprised, as I had been taught more-or-less the same
thing, just not the minimum gaurantees for short and long.
"C++ guarantees a char is exactly one byte which is at least 8 bits,
short is at least 16 bits, int is at least 16 bits, and long is at least
32 bits."
I looked in Stroustrup's book, The C++ Programming Language, and sure
enough he explains it just as is quoted above (don't know how I passed
over that before - anyhow...). I went to look in my copy of the C++
Standard 1998-09-01 and could not locate this requirement. I've read in
other threads that a newer version was released... was this a change in
the new version or am I just looking in the wrong spot? I was looking
in section 3.9.1 Fundamental Types.
A second related question has to do with the newer version of the
standard. What is the format of this document? Is it just the changes
to the version I have, or is it a complete document representing the
current state of the C++ standard?
Thanks,
Kyle
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.5
and was a bit surprised, as I had been taught more-or-less the same
thing, just not the minimum gaurantees for short and long.
"C++ guarantees a char is exactly one byte which is at least 8 bits,
short is at least 16 bits, int is at least 16 bits, and long is at least
32 bits."
I looked in Stroustrup's book, The C++ Programming Language, and sure
enough he explains it just as is quoted above (don't know how I passed
over that before - anyhow...). I went to look in my copy of the C++
Standard 1998-09-01 and could not locate this requirement. I've read in
other threads that a newer version was released... was this a change in
the new version or am I just looking in the wrong spot? I was looking
in section 3.9.1 Fundamental Types.
A second related question has to do with the newer version of the
standard. What is the format of this document? Is it just the changes
to the version I have, or is it a complete document representing the
current state of the C++ standard?
Thanks,
Kyle