#include <stdio.h> struct Object{ virtual void method(){}; virtual ~Object() = 0; }; Object::~Object(){} int main(){ Object obj; return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:11:9: error: cannot declare variable ‘obj’ to be of abstract type ‘Object’ Object obj; ^ prog.cpp:3:8: note: because the following virtual functions are pure within ‘Object’: struct Object{ ^ prog.cpp:8:1: note: virtual Object::~Object() Object::~Object(){} ^
Standard output is empty