coddding coddding - 4 years ago 62
C++ Question

Porting program, curious if int16_t & __int16 are 'the same'

So i am porting one of my programs to a new gaming console. The problem is that the SDK used to compile my c++ application doesn't support

__int16
, BUT it does have
int16_t
.
Would it be 'safe' to use
int16_t
in replace of
__int16
?

Also, if im not mistaken could i just use
unsigned short int
for a 16 bit
integer
rather than using
int16_t
or
__int16
?

Answer Source

They will be the same.

People used to define their own fixed width types before the standard ones came out. Just use a typedef - that's what they are for.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download