1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to enforce a virtual fn is overloaded by derived class?

Discussion in 'C++' started by Alex, Apr 12, 2009.

  1. Alex

    Alex New Member

    Joined:
    Oct 1, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    Hi All,
    I need to enforce requirement that the programmer overloads a particular
    virtual function in all derived classes.
    i.e.
    class base {
    public:
    virtual void foo() {} // base has some handler
    class deriv1 : public base {
    void foo() {} // good overridden
    class deriv2 : public base {
    I am using VS2008 (VC9) (not /clr) so it adheres to _some_ of the standard
     

Share This Page