For a project I'm doing for class I have to make a virtual method in a class. A subclass will inherit the virtual method and instantiate it in a separate .cpp file. The problem I'm having is that I need the class that has the virtual method to instantiate its version of the method as well as the subclass. I get an error that says "cannot instantiate an abstract class" even though it is instantiated in a .cpp.
Here's my code:
using namespace std;
// Sets the Address
SubdomainPart(const String& address);
virtual bool IsValid() = 0;
Related Article:Cloneable abstract mix-in class
is a solved C++ discussion thread by sciwizeh that has 2 replies, was last updated 4 months ago and has been tagged with the keywords: clonable, java, c++, mix-in, class, virtual.