Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ C++/CLI C MFC ATL WTL STL
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 23: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)

#ifndef _SIZE_T_DEFINED
#ifdef  _WIN64
typedef unsigned __int64    size_t;
#else
typedef _W64 unsigned int   size_t;
#endif
#define _SIZE_T_DEFINED
#endif


  Permalink  
  Print Answers RSS
0 BillWoodruff 330
1 Mathew Soji 309
2 Maciej Los 295
3 DamithSL 225
4 Afzaal Ahmad Zeeshan 217
0 OriginalGriff 6,369
1 Sergey Alexandrovich Kryukov 5,973
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,025


Advertise | Privacy | Mobile
Web03 | 2.8.1411019.1 | Last Updated 10 Oct 2008
Copyright © CodeProject, 1999-2014
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