Goodday people,
I'm trying out some pointer functions in Visual C++, to understand more
about C++
I have the following code in one of my class member functions (see bottom of post).
What I tried to do is allow the class this function is in to write into the
document that is attached to my CDocument class called CMainDoc.
However when I use this function I receive an error genereted (according to the debug window by following code)
_AFXCOLL_INLINE void*& CPtrList::GetHead()
--> { ASSERT(m_pNodeHead != NULL);
return m_pNodeHead->data; }
This means that m_pNodeHead = 0 ??
Does anybody know what is wrong with my code?
Thanks Martini.
memberfunction blabla::writeinto(CString datastring)
{
///............. rest of function
typedef void(CMainDoc::*pMaindoc) (CString);
pMaindoc tptr;
tptr = &CMainDoc::WriteInto;
CMainDoc p;
// CMainDoc *pt = &p;
(p.*tptr) ("Test\n"
// (pt->*tptr) ("Test2\n"
return erno;
}
I'm trying out some pointer functions in Visual C++, to understand more
about C++
I have the following code in one of my class member functions (see bottom of post).
What I tried to do is allow the class this function is in to write into the
document that is attached to my CDocument class called CMainDoc.
However when I use this function I receive an error genereted (according to the debug window by following code)
_AFXCOLL_INLINE void*& CPtrList::GetHead()
--> { ASSERT(m_pNodeHead != NULL);
return m_pNodeHead->data; }
This means that m_pNodeHead = 0 ??
Does anybody know what is wrong with my code?
Thanks Martini.
memberfunction blabla::writeinto(CString datastring)
{
///............. rest of function
typedef void(CMainDoc::*pMaindoc) (CString);
pMaindoc tptr;
tptr = &CMainDoc::WriteInto;
CMainDoc p;
// CMainDoc *pt = &p;
(p.*tptr) ("Test\n"
// (pt->*tptr) ("Test2\n"
return erno;
}