I have a simple question on the variable’s types in C/C++, namely
one can declare such types as
int32_t, int64_t, etc.
My question is what does “t” mean in these types and what’s the difference from
the usual types, like int32, int64.
Thanks!
…
Sorry, I don’t know how to answer properly to all who responded to my question instead of writing separate comments. Anyway, thanks to all of you for your replies.
Well, I have to say that I am parsing a code and I am a newbie in C/C++ (not C#)
Concerning int32_t etc they seem indeed to be defined separately in a header file:
#include <stdint.h>
#ifdef _FAST_
#define SHORT uint_fast16_t
#define INT uint_fast32_t
#define LONG uint_fast64_t
#else
#define SHORT uint16_t
#define INT uint32_t
#define LONG uint64_t
#endif
Could someone explain what this construction means?
There are no built in types like
Int32_tandInt64_t, and there are no magic suffix_tthat you can add to an existing type.The types
Int32_tandInt64_thas to be defined somewhere in your code. They are probably using theInt32andInt64types in some way, but there is no magic involved just because the type names contains other type names. They could just as well be namedABigNumberandABiggerNumberas far as the compiler is concerned.