xXlMisticXx
xXlMisticXx

Reputation: 13

C++ - Which are variable by " Uint "?

Which are variable by " Uint "? is that there are " Uint8 ", " Uint16 ", etc ...

But what are they ?

Now I have some time using C ++ but I have never needed to use these variables and cause me curious.

Thanks in advance.

Upvotes: 1

Views: 5527

Answers (3)

AKASH
AKASH

Reputation: 11

typedef unsigned char  uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long  uint32_t;
typedef signed   char  int8_t;
typedef signed   short int16_t;
typedef signed   long  int32_t;

It can help you..

if you are dealing with variable base on it's size then you can declare it like this

Upvotes: -2

Sourav Ghosh
Sourav Ghosh

Reputation: 134326

uint is not a basic data type as mentioned in the standard. Sometimes, to make a variable to have constant size across platform [to enable portability], some typedefs are used.

You can have a look at cstdint header for more info.

With best assumption, uint should be a typedef to uint32_t

typedef uint32_t uint;

Upvotes: 0

haccks
haccks

Reputation: 106012

uint is not a standard type. On some system uint is typedefed as

typedef unsigned int uint ;

Upvotes: 4

Related Questions