[CLN-list] Integer types in C
Alexei Sheplyakov
alexei.sheplyakov at gmail.com
Tue Jan 19 22:58:56 CET 2010
On Tue, Jan 19, 2010 at 01:15:21PM -0500, walsh.timothy at uqam.ca wrote:
> P.S. Is there a way in C to declare an integer to be 64 bits long?
In C89: no, one should resort to OS/compiler specific code. In C99: yes
(at least theoretically):
#include <stdint.h>
int64_t foo;
However, a) be careful to not confuse it with intptr_t, b) beware of
non-conforming compilers (in particular, the m$ one is particularly guilty).
Best regards,
Alexei
P.S. Please use proper forums/mailing lists [1] for discussing generic
questions about C/C++. Chances are that your question has already
been answered.
[1] for example, http://groups.google.com/group/comp.lang.c
More information about the CLN-list
mailing list