E
efrenba
Hi there,
I'm studying dynamic data structure (simple & double linked list,
heap, cola, tree, etc) but the teacher obviated the namespaces and
others declarations that I don't know their names, old students call
it demons inside functions. I'm writing here hoping for you can help
me.
I've downloaded a tuto where is explained what are the namespace, so,
I don't have doubts about it.
The other thing is something like a function with parameters of
function (called demons), here, I write you the classes declaration
that he wrote on the blackboard, unfortunately he didn't write the
implementation.
class TNode
{
private:
void *aData;
TNode *aNext;
public:
TNode(void *pData);
~TNode();
void *Data();
void Data(void *);
TNode *Next();
TNode Next(TNode *);
}
class TSimpleLinkedList
{
typedef void(*TFunctionAction)(TNode *, void *reference = NULL);
private:
int aLength;
TNode *aFirst;
public:
TSimpleLinkedList();
~TSimpleLinkedList();
void Add(void *);
void *Delete(int);
int Length() { return aLength; }
void *Item(int);
void ForEach(TFunctionAction, void *);
}
Any idea about it?
How really is the name of this?
Thanx in advance,
Efren
I'm studying dynamic data structure (simple & double linked list,
heap, cola, tree, etc) but the teacher obviated the namespaces and
others declarations that I don't know their names, old students call
it demons inside functions. I'm writing here hoping for you can help
me.
I've downloaded a tuto where is explained what are the namespace, so,
I don't have doubts about it.
The other thing is something like a function with parameters of
function (called demons), here, I write you the classes declaration
that he wrote on the blackboard, unfortunately he didn't write the
implementation.
class TNode
{
private:
void *aData;
TNode *aNext;
public:
TNode(void *pData);
~TNode();
void *Data();
void Data(void *);
TNode *Next();
TNode Next(TNode *);
}
class TSimpleLinkedList
{
typedef void(*TFunctionAction)(TNode *, void *reference = NULL);
private:
int aLength;
TNode *aFirst;
public:
TSimpleLinkedList();
~TSimpleLinkedList();
void Add(void *);
void *Delete(int);
int Length() { return aLength; }
void *Item(int);
void ForEach(TFunctionAction, void *);
}
Any idea about it?
How really is the name of this?
Thanx in advance,
Efren