Jan 17, 2015 at 2:20am UTC
Let's say I have a section of code as follows:
Do pPt1 and pPt2 give the same value here?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
CArray<CPoint,CPoint> myArray;
Class CTest
{
public :
myArray arr;
int a;
};
CTest Test;
Test.arr.SetSize(32, 128);
CPoint* pPt1 = Test.arr.GetData();
CPoint* pPt2 = arr.GetData();
Last edited on Jan 17, 2015 at 2:24am UTC
Jan 17, 2015 at 2:21pm UTC
That code would not even compile.
Jan 17, 2015 at 3:12pm UTC
Yes, but let's assume that is is OK. How about the question?
Jan 17, 2015 at 3:27pm UTC
Literally CPoint* pPt2 = arr.GetData();
will not compile. So it cannot be the same as the other, because it does not exist
Jan 17, 2015 at 4:02pm UTC
Well, I think I see the problem now.
It is OK if I put that line into the class CTest, right?
Jan 17, 2015 at 5:09pm UTC
Please show an example of compiling code illustrating what you mean. If you have trouble making an example that compiles, post the code and the compiler errors.
Last edited on Jan 17, 2015 at 5:09pm UTC