| Gary Chang[MSFT] 2005-06-11, 3:59 am |
| Hi Tamas,
>...
>This code does not compile. It says the get and set accessors are
>not implemented in PrpoImpl. They obviously are. The same thing
>compiles without problems in beta 1. Am I missing something?
Just as the error message figured it out : the virtual function of an
Interface needs a "virtual" keyword to implement/override in its
implementing class, so add the "virtual" keyword to your implementing
function will work.
...
ref class PropImpl : public IEFace {
int MyInt;
public:
property int VirtualProperty2 {
virtual int get() {
return MyInt;
}
virtual void set(int i) {
MyInt = i;
}
}
...
So in this case, the corresponding MSDN doc is not accurate for VS2005
beta2. Since it is a pre-release documentation for Visual Studio 2005, it
will subject to change in future releases on such issues.
Thanks for your understanding!
Best regards,
Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no rights.
|