[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'class XX' has no member named 'YY'

From: alaudo
Subject: 'class XX' has no member named 'YY'
Date: 5 Dec 2006 05:04:33 -0800
User-agent: G2/1.0


I am writing a code with one class having a variable of the other class
and I get the error message:

'class Menge' has no member named 'Clear'

What could that be?
Here's the code:

// Definition of the first class
class Menge
   // skipped

             int add (int elem)

             int in (int elem)

             void clear ()

             Menge ()

// Definition of the second class

class Field
// skipped
// Here is the variable of the fist class
    Menge AliveRules;
    Menge BornRules;

// Here's the private method of the second class, calling the first
class methods
     void processrules()

        AliveRules.Clear(); // <--- Here is the error message
        BornRules.Clear(); // <--- Here as well
        int i=0;
        while (&Rules[i] != "/")
        {AliveRules.Add(atoi(Rules[i])); i++;}
        while (&Rules[i] != "/")
        {BornRules.Add(atoi(Rules[i])); i++;}
        RulesProcessed = true;
// skipped

reply via email to

[Prev in Thread] Current Thread [Next in Thread]