Re: class problem
On Jan 30, 4:03 am, Chameleon <cham_...@hotmail.com> wrote:
O/H Chameleon =DD=E3=F1=E1=F8=E5:
The problem:
class Folder inherits from class Entry but class Entry uses pointer to
Folder objects.
This produce:
error: forward declaration of `struct Folder'
error: invalid use of undefined type `struct Folder'|
What I can do?
---------------------------------------------------------
class Entry
{
public:
string getFullPathName() { return parent ? parent->getFullPathN=
ame()
+ '/' + getName() : getName(); }
string getName() { return name; }
Folder *getParent() { return parent; }
protected:
string name;
Folder *parent;
};
class Folder : public Entry {............}
----------------------------------------------------------
OMG!!!
I am not me who ask this question!!!
class Folder;
class Entry {...}
class Folder {...}
On Jan 30, 4:03 am, Chameleon <cham_...@hotmail.com> wrote:
O/H Chameleon =DD=E3=F1=E1=F8=E5:
The problem:
class Folder inherits from class Entry but class Entry uses pointer to
Folder objects.
This produce:
error: forward declaration of `struct Folder'
error: invalid use of undefined type `struct Folder'|
What I can do?
---------------------------------------------------------
class Entry
{
public:
string getFullPathName() { return parent ? parent->getFullPathName(=
)
+ '/' + getName() : getName(); }
string getName() { return name; }
Folder *getParent() { return parent; }
protected:
string name;
Folder *parent;
};
class Folder : public Entry {............}
----------------------------------------------------------
OMG!!!
I am not me who ask this question!!!
class Folder;
class Entry {...}
class Folder {...}
There is 3 entries
that you can enjoy!
The passion 'produced' from the brain
via many more neurons.
Entry number 1 is as big
as a chopstick's head that
Only performs fluid simulation.
Entry number 2 is as large
as one finger's size but
It can be enlarge if you insist
Entry number 3 is the largest
Which you can insert your cigar and
Have a feel for the smoke as the outcome!
Enjoy, enjoy, enjoy...