May
06
2009
Hello,
What is a Linked List? Linked-list is a list that each element has a pointer to the next one.
The professor once again send us an enunciation to solve and it is too big. And I will not translate it. Inside the problem it have a Linked list.
Problem using linked-list..
Regards,
Matheus
PS: You can see the enunciation in portuguese and then use google translate to translate it
Read more »
Apr
28
2009
This is a implementation of a Stack using pointers. The basic thing is the structure of tPilha is
constant MAXPILHA = 100;
tipo tPilha {
inteiro dados[MAXPILHA];
inteiro *topo;
};
Where *topo is a pointer to the first element in the stack. When you`re going to add a new one you verify if the stack is full, if it ins`t you put the data in a position in the stack and change the *topo. When removing, you decrement one in pointer *topo. Then it will reference the element that was there before.
(I had an enunciation but it was too big to translate)
stack with pointers implementation!
Regards,
Matheus
PS: You can see the enunciation in portuguese and then use google translate to translate it