Click here to Skip to main content
12,948,130 members (68,157 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hello everyone,


1.

I am developing for both x86 and x64. I stop mouse on size_t in the code, and "typedef unsigned int size_t" is always displayed. I think it is not correct for x64. Since x64 size_t is 64-bit and unsigned int on x64 is 32-bit. So, the first question is how to let mouse display the correct typedef?

2.

But when I select size_t and click go to Definition/Declaration, but always failed. Where are they defined?


thanks in advance,
George
Posted 9-Oct-08 22:06pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

George_George wrote:

I am developing for both x86 and x64. I stop mouse on size_t in the code, and "typedef unsigned int size_t" is always displayed. I think it is not correct for x64. Since x64 size_t is 64-bit and unsigned int on x64 is 32-bit. So, the first question is how to let mouse display the correct typedef?


I would not bet my money on what intellisense tell me.


  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

from io.h (and crtdefs.h)

<br />#ifndef _SIZE_T_DEFINED<br />#ifdef  _WIN64<br />typedef unsigned __int64    size_t;<br />#else<br />typedef _W64 unsigned int   size_t;<br />#endif<br />#define _SIZE_T_DEFINED<br />#endif<br />


  Permalink  
    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,344
CHill60 3,275
Maciej Los 2,703
Jochen Arndt 1,935
ppolymorphe 1,795


Advertise | Privacy | Mobile
Web01 | 2.8.170524.1 | Last Updated 10 Oct 2008
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100