|
-
April 28th, 1999, 08:18 AM
#1
Access function of View class
Hi,
I want to access a member function of a view class from a custom class.
I have declare my view class a friend class of the custom class:
friend class CTestView;
In my custom class, I have a member function in wich I want to access a member function of my view class:
void Calcul_Int (CTestView pView)
{
int nombre;
nombre = pView->GetInt();
}
In my view class, I have:
CMyClass result;
CTestView* pView;
pView = this;
result.Calcul_Int(pView);
I can compile this code. I get the error message:
error C2664: 'Calcul_Int' : cannot convert parameter 1 from 'class CTestView *' to 'class CTestView'.
Can anyone give me some hints?
Thanks
Claude Gagnon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|