This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Please help with these two errors
- From: mahmoodn <nt_mahmood at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 13 Jan 2008 08:24:16 -0800 (PST)
- Subject: Please help with these two errors
Hi,
I have defined a class named "vertex_feature_2":
class Vertex_feature_2
{
public:
enum Type
{
CIRCULAR,
CHAIN
};
private:
int ver_id; // The ID of the coresponding vertex.
public:
/*!
* Default constrcutor.
*/
Vertex_feature_2 () :
ver_id (-1)
{}
/*!
* Destructor.
*/
virtual ~Vertex_feature_2 ()
{}
/*!
* Get the feature type.
*/
virtual Vertex_feature_2::Type type () const = 0; // ERROR1&-(
and also there is a class "circular_arc_2" that is derived from
"vertex_feature_2":
class Circular_arc_2 : public Vertex_feature_2
{
virtual typename Vertex_feature_2::Type type () const
{
return (CIRCULAR); //ERROR2&-(
}
}
there are two problems:confused::confused::
error: `Type' declared as a `virtual' field
error: `CIRCULAR' was not declared in this scope
how can I resolve them?:working:
Thanks,
--
View this message in context: http://www.nabble.com/Please-help-with-these-two-errors-tp14787660p14787660.html
Sent from the gcc - Help mailing list archive at Nabble.com.