class problem

C

Chameleon

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 {............}
----------------------------------------------------------
 
C

Chameleon

O/H Chameleon Ýãñáøå:
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 {...}
 
I

imuaplease

O/H Chameleon Ýãñáøå:







OMG!!!
I am not me who ask this question!!!

class Folder;
class Entry {...}
class Folder {...}

O/H Chameleon Ýãñáøå:







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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,293
Latest member
Hue Tran

Latest Threads

Top