Hi,
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
public:
int add (int elem)
int in (int elem)
void clear ()
Menge ()
};
// Definition of the second class
class Field
{
private:
// 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++;}
i++;
while (&Rules[i] != "/")
{BornRules.Add(atoi(Rules[i])); i++;}
RulesProcessed = true;
}
// skipped
};
_______________________________________________
help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus