function with parameters of function

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
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top