Re: Interface stuff does not compile



Oh, thank you. I's very interesting.

Then, the way to uncomment second "void m(void)" is to rename virtual
method, because

public:
virtual void i2::m() {}

does not work.

It could be:

public:
virtual void newMethod() = i2::m ()

With or without sealing it.

I'm in love with C++. :-)

--
Si de pronto se descompusieran todos los televisores del mundo, no habría
escalas para medir los maremotos de aburrimiento.
-- Manuel Campo Vidal. (1951-) Periodista español.

"Marcus Heege" <NOSPAM@xxxxxxxxx> wrote in message
news:ujB6J5PaGHA.1196@xxxxxxxxxxxxxxxxxxxxxxx
In addition to the public implementation that Bruno and Tamas have
mentioned, you can also provide a private implementation. The code below
compiles even though the methods implementing the interface are private:

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

{

virtual void m(void) sealed = i1::m {;}

virtual void m2(void) sealed = i1::m2 {;}

virtual void m3(void) sealed = i2::m3 {;}

};




.



Relevant Pages

  • 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)
  • Re: Interface stuff does not compile
    ... In addition to the public implementation that Bruno and Tamas have ... you can also provide a private implementation. ... void m2; ...
    (microsoft.public.dotnet.languages.vc)
  • Print preview problem..
    ... but it's using my CViewPrintPreview class based on CView class. ... virtual void OnFilePrintPreview; ... virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); ...
    (microsoft.public.vc.mfc)
  • Custom Control derived from CWnd wont paint inside CFormView Wind
    ... comboboxes, textboxes, and a custom control. ... void CDualTree::OnDraw ... The following class header for CAzureView is the result of those two actions: ... virtual void OnInitialUpdate(); // called first time after construct ...
    (microsoft.public.vc.mfc)
  • Re: polymorphic design approach
    ... > polymorphism. ... * 'Device' pointers are stored so as to allow polymorphic ... virtual void handleMessage ...
    (alt.comp.lang.learn.c-cpp)