Re-forward declaration of types which were already forward declared
From: qazmlp (qazmlp1209_at_rediffmail.com)
Date: 02/15/04
- Next message: Peter Kragh: "Re: Conditionally copying text to string"
- Previous message: alexhong2001: "String search library"
- Next in thread: Jonathan Turkanis: "Re: Re-forward declaration of types which were already forward declared"
- Reply: Jonathan Turkanis: "Re: Re-forward declaration of types which were already forward declared"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 15 Feb 2004 10:44:55 -0800
Is it a good style to re-forward declare the types, which were already
forward declared in base header file, in derived class header file?
// base.h
class addrClass;
class base
{
public:
virtual void setAddress(addrClass* node);
// Other members
} ;
// derived.h
// Is it a good style to forward declare addrClass here?
// As setAddress method and hence the parameter of type 'addrClass*'
// is from the base class, it may not be required, I suppose.
class derived : public base
{
public:
virtual void setAddress(addrClass* node);
// Other members
} ;
And, similarly, what about #include-ing the header which has to be
added
only because of the Base class method signatures?
- Next message: Peter Kragh: "Re: Conditionally copying text to string"
- Previous message: alexhong2001: "String search library"
- Next in thread: Jonathan Turkanis: "Re: Re-forward declaration of types which were already forward declared"
- Reply: Jonathan Turkanis: "Re: Re-forward declaration of types which were already forward declared"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|