Saturday, October 22, 2005

Abstract Class


class AbstractClass
{
public:
void bar();
virtual void foo() = 0; //function not defined
AbstractClass();
virtual ~AbstractClass();

};

void AbstractClass::bar()
{
foo(); //calling the undefined function
}


This code will compile.

No comments: