so this code
Originally Posted by Magos
won't compile? I'm afraid I call bull......... There are only 2 differences between classes and structs
#define interface struct
virtual void doStuff(void) = 0;
class derived : public base
virtual void doStuff(void)
1: default access (public in struct, private in class)
2: you can't forward declare a struct as a class or vice versa
but you can certainly inherit one from the other.
// some code
struct MyClass // causes a redefinition error
as for the interface "keyword", it's an ms-specific extension that's recognised by visual studio. It was originally added in for COM support.