1struct Abstract
2{
3 virtual ~Abstract() = 0;
4};
5
6Abstract::~Abstract() {}
7
8struct Valid: public Abstract
9{
10 // Notice you don't need to actually overide the base
11 // classes pure virtual method as it has a default
12};
13
14
15int main()
16{
17 // Abstract a; // This line fails to compile as Abstract is abstract
18 Valid v; // This compiles fine.
19}