INT_PTR question
-
I noticed that in VS 2005, the return values of GetCount method of CList and CArray and their derived classes are of INT_PTR. I am wondering why INT_PTR not int or long? To me, that is getting messy of MFC 7.0 or higher in dealing with data types. Thanks. -- modified at 16:05 Tuesday 28th March, 2006
-
I noticed that in VS 2005, the return values of GetCount method of CList and CArray and their derived classes are of INT_PTR. I am wondering why INT_PTR not int or long? To me, that is getting messy of MFC 7.0 or higher in dealing with data types. Thanks. -- modified at 16:05 Tuesday 28th March, 2006
yellowine wrote:
I am wondering why INT_PTR not int or long?
In
basetsd.h
, it is defined as anint
(or__int64
).
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
-
I noticed that in VS 2005, the return values of GetCount method of CList and CArray and their derived classes are of INT_PTR. I am wondering why INT_PTR not int or long? To me, that is getting messy of MFC 7.0 or higher in dealing with data types. Thanks. -- modified at 16:05 Tuesday 28th March, 2006
Hi, you can you
const int nLength = (int)pArray.GetSize()
to remove all the 4 level warnings in your application - i'm dealing with 32 bit applications.