From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14260 invoked by alias); 13 Jan 2008 16:24:44 -0000 Received: (qmail 14249 invoked by uid 22791); 13 Jan 2008 16:24:44 -0000 X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 13 Jan 2008 16:24:18 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JE5dA-0001m2-8u for gcc-help@gcc.gnu.org; Sun, 13 Jan 2008 08:24:16 -0800 Message-ID: <14787660.post@talk.nabble.com> Date: Mon, 14 Jan 2008 13:09:00 -0000 From: mahmoodn To: gcc-help@gcc.gnu.org Subject: Please help with these two errors MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nt_mahmood@yahoo.com X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00116.txt.bz2 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.