Newsgroups: comp.lang.c++
From: Sana <sanata...@gmail.com>
Date: Fri, 20 Feb 2009 06:47:44 -0800 (PST)
Local: Fri, Feb 20 2009 2:47 pm
Subject: Re: Automatically create a clone() function for derived classes
On Feb 20, 9:25 am, Juha Nieminen <nos...@thanks.invalid> wrote:
> class Base > // other stuff here > }; > The problem is that this clone() function must be replicated in all > class Derived: public Base > }; > It's not only tedious to have to write this line in each of the if the derived class doesn't implement the clone() method, the linker will complain. virtual Base* clone() const = 0; -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||