Compiler Error - 12-20-2008 , 03:55 PM
pArrTable = &m_pArrTable;
I'm getting a compiler error from the following line of code:
(*(PTABLE_INFO_STRUCT)pArrTable[i]).strResult = _T("3");
Any suggestion on how to fix the code?
Re: Compiler Error - 12-21-2008 , 06:03 AM
You need to dereference pArrTable before you can apply operator. Also, you do
not ned to dereference to access a member of a class or struct; you can use the
((PTABLE_INFO_STRUCT)(*pArrTable)[i])->strResult = _T("3");
But really, why are you using CPtrArray? Or the MFC collection classes at all
really. Just learn the STL containers instead
arrTable[i]->strResult = _T("3");
Visual C++ MVP
Re: Compiler Error - 12-21-2008 , 10:17 AM
Thanks for the solution, and also for the suggestion to learn STL.
STL looks a lot less complicated.
"David Wilkinson" wrote:
|Thread Tools||Search this Thread|