Re: Interface stuff does not compile
- From: "solved by design" <zephryn.xirdal@xxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 10:16:22 +0200
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 {;}
};
.
- References:
- Interface stuff does not compile
- From: solved by design
- Re: Interface stuff does not compile
- From: Marcus Heege
- Interface stuff does not compile
- Prev by Date: Re: casting in generic
- Next by Date: C++ vs. C# (new to windows programming)...
- Previous by thread: Re: Interface stuff does not compile
- Next by thread: C++/CLI reference
- Index(es):
Relevant Pages
|