Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
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

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.


 
Share this answer
 
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 />


 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900