Re: Interface stuff does not compile



Hi all!

I have this clases:

interface class i1

{

void m(void);

void m2(void);

};

interface class i2

{

//void m(void);

void m3(void);

};

ref class pepe:public i1,public i2

{

put 'public:' here and it compiles without a problem.
members are private by default in a ref class.
i think private is not what you want anyway?
otherwise you would not have used 'virtual' probably.

I think interface members have to be implemented as public.
otherwise they won't make much sense.
see here for references:
http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=365736


virtual void m(void){;}

virtual void m2(void){;}

virtual void m3(void){;}

};

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"


.



Relevant Pages

  • Interface stuff does not compile
    ... void m2; ... virtual void m2 ... Si de pronto se descompusieran todos los televisores del mundo, ...
    (microsoft.public.dotnet.languages.vc)
  • template & void argument
    ... I would like to implement an interface class that defines a pure virtual ... The first idea was to use a template, but in that case void is not admited ... Any work-around this? ... Manuel ...
    (comp.lang.cpp)
  • Re: Interface stuff does not compile
    ... the way to uncomment second "void m" is to rename virtual ... virtual void i2::m ... you can also provide a private implementation. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: template & void argument
    ... >I would like to implement an interface class that defines a pure virtual ... >method that could take any parameter as input, void inlcuded. ... >The first idea was to use a template, but in that case void is not admited ... C++ FAQ: http://www.parashift.com/c++-faq-lite/ ...
    (comp.lang.cpp)
  • Re: MFC Flicker and the Application Framework
    ... You may find this to be much easier and you don't have to worry about the flickering stuff so much. ... // FlickeringCounterView.cpp: implementation of the CFlickeringCounterView ... void CFlickeringCounterView::AssertValidconst ... virtual void OnBeginPrinting; ...
    (microsoft.public.vc.mfc)