public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Please help with these two errors
@ 2008-01-14 13:09 mahmoodn
  2008-01-14 15:45 ` John (Eljay) Love-Jensen
  0 siblings, 1 reply; 14+ messages in thread
From: mahmoodn @ 2008-01-14 13:09 UTC (permalink / raw)
  To: gcc-help


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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-01-16 12:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-14 13:09 Please help with these two errors mahmoodn
2008-01-14 15:45 ` John (Eljay) Love-Jensen
2008-01-15  8:30   ` mahmoodn
2008-01-15 15:17     ` John (Eljay) Love-Jensen
2008-01-16 12:05       ` mahmoodn
2008-01-16  0:45     ` Jonathan Saxton
2008-01-16 12:31       ` mahmoodn
2008-01-16 13:18         ` John (Eljay) Love-Jensen
2008-01-16 14:27           ` mahmoodn
2008-01-16 14:27             ` John (Eljay) Love-Jensen
2008-01-16 14:42             ` John (Eljay) Love-Jensen
2008-01-17  0:56               ` mahmoodn
2008-01-16 15:34             ` mahmoodn
2008-01-16 15:55             ` mahmoodn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).