[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 |
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
};
- 'class XX' has no member named 'YY',
alaudo <=