I hope I got that title right. I'm new to C++ and I've started reading the tutorials for a few weeks. I'm using MSVS2010 Ultimate and I was wondering how do you know what combinations of type identifiers (is that how I say it?) are valid? Also how do you determine how one affects another (their size in bytes) i.e a regular int is 4 bytes long but a short int is 2 bytes.
Why doesn't a short short int exist? I asked over at stackoverflow but they were a bit harsh on me and vaguely said that.
When I output the size of a long double its the same as the size of a double on my machine. Does that mean that a long double for me is in effect the same as a double? Or does that change on different platforms.
No, a short(2 bytes)+short(2 bytes) int=an int(4 bytes) so there is no need for that to exist.
When I output the size of a long double its the same as the size of a double on my machine. Does that mean that a long double for me is in effect the same as a double? Or does that change on different platforms.
Generally, a long double=double as long int=int. But a long long double is different.
Also, the size(bytes) of these data types vary accross different platforms, but types like bool(boolean) are constant.
NB: these are not called identifiers, but ragher, data types. The names given to variables, function,etc...are rather the IDs.