Is "long" still useful in C?
Posted
by dan04
on Stack Overflow
See other posts from Stack Overflow
or by dan04
Published on 2010-03-07T22:29:51Z
Indexed on
2010/03/08
0:52 UTC
Read the original article
Hit count: 384
Filed under:
c
- It's not the largest integer type anymore now that there's "long long".
- It's not a fixed-width type: It's 32 bits on some platforms and 64 on others.
- It's not necessarily the same size as a pointer (for example, on 64-bit Windows)
So, does "long" have any meaning anymore? Is there ever a reason to declare a long instead of a ptrdiff_t or int64_t?
© Stack Overflow or respective owner