Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New C++ standard approvd
#4
Katforks Wrote:C++ has always made my head hurt but good lord. longs in C# at least were already 64bit [and are in the other languages i've worked with iirc, haven't had to pay attention to it until recently], so if they made long long int be 64 then what the hell is a normal int, 16?
I like the threading stuff and what they did to sizeof though. If I ever need to pick this up to complete my knowledge of the C family I'll feel a little better about learning it.
I still prefer java though ;-;

C and C++ are designed to be ultraportable, usable for any conceivable processor architecture. Most (all?) processors these days have 8-bit bytes (where a "byte" means the smallest addressable memory unit), but back in the days when C was created, this was not the case. There were processors with 7-bit bytes. The standard only specifies a minimum size for the integral types. The actual size is compiler/platform dependent. If you want a variable to be a specific size, you can #include <boost/cstdint.hpp> or <stdint.h> or <cstdint> and use int64_t or whatever.

Long long was already supported as an extension by most compilers. If memory serves, MSVC targeting x86 has short=16, int=32, long=32, long long=64.
Reply


Messages In This Thread
New C++ standard approvd - by Spaz - 2011-08-17, 11:09 PM
New C++ standard approvd - by Katforks - 2011-08-18, 01:49 PM
New C++ standard approvd - by Nikkey - 2011-08-18, 03:50 PM
New C++ standard approvd - by Spaz - 2011-08-18, 06:03 PM
New C++ standard approvd - by Heidi - 2011-08-18, 07:36 PM
New C++ standard approvd - by Spaz - 2011-08-18, 07:46 PM
New C++ standard approvd - by Katforks - 2011-08-19, 10:50 AM
New C++ standard approvd - by Heidi - 2011-08-19, 06:02 PM
New C++ standard approvd - by Spaz - 2011-08-19, 06:34 PM
New C++ standard approvd - by Heidi - 2011-08-19, 06:42 PM
New C++ standard approvd - by Heidi - 2011-08-19, 06:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)