Search code examples
c++function-prototypes

= operator in function prototype


Possible Duplicate:
Pure virtual functions may not have an inline definition. Why?

I've come accross a function prototype that looks like this:

    virtual void functionName(const int x) = 0;

what does that =0 exactly mean?


Solution

  • This denotes purely virtual (abstract) function. Class containing such function is automatically abstract and any class deriving from it you want to instantiate must implement this function.