NO

Author Topic: size_t  (Read 2172 times)

czerny

  • Guest
size_t
« on: July 06, 2014, 04:39:10 PM »
There are at least two different (intrin.h or direct.h or regex.h) definitions of 'size_t':
Code: [Select]
typedef unsigned int size_t;
typedef unsigned long long size_t;
Is there a rule of thumb, which function uses which definition?

JohnF

  • Guest
Re: size_t
« Reply #1 on: July 06, 2014, 05:25:00 PM »
If you look in the headers you will find

Code: [Select]
#if __POCC_TARGET__ == 3
typedef unsigned long long size_t;
#else
typedef unsigned int size_t;

In the help file is this.

__POCC_TARGET__
The current target processor specified through the /T option. Defined as the integer constant 1 for X86, or 3 for AMD64. [5.0]

So when compiling 64bit stuff size_t will be unsigned long long.

John
« Last Edit: July 06, 2014, 05:37:11 PM by JohnF »

czerny

  • Guest
Re: size_t
« Reply #2 on: July 06, 2014, 06:02:37 PM »
Oh sorry! That was easy!