https://github.com/lorhansohaky/stack
https://github.com/lorhansohaky/stack
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lorhansohaky/stack
- Owner: LorhanSohaky
- License: mit
- Created: 2016-01-09T15:11:34.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-26T20:00:21.000Z (almost 8 years ago)
- Last Synced: 2025-06-13T18:47:53.540Z (7 months ago)
- Language: C
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## PILHA GENÉRICA EM C
### DEPRECATED
Use [DataStructures](https://github.com/LorhanSohaky/DataStructures)
### LICENÇA
**MIT**
[Leia a licença](LICENSE)
### COMPILADOR UTILIZADO
***GCC (TDM-1) 4.7.1 -> Windows***
### OBJETIVO
Criar tipos genéricos de campos para utiliza-lo em conceitos como Lista, Fila e entre outros.
###NOTAS:
- [GenericField](https://github.com/LorhanSohaky/GenericField)
### COMO USAR
`Stack *createStack()`: Retorna o endereço de memória da Pilha. Retorna NULL em caso de erro.
`int insertElement(Stack *stack,void *value, int type)`: Insere elemento na pilha. Retorna -1 em caso de erro.
- Stack *stack: Endereço de memória da pilha.
- void *value: Endereço de memória do valor.
- int type: Tipo de valor.
`GenericField *getElement(const Stack *stack)`: Retorna o elemento. Retorna -1 em caso de erro.
- const Stack *stack: Endereço de memória da pilha.
`int nextElement(Stack *stack)`: Move para o próximo elemento. Retorna -1 em caso de erro.
- Stack *stack: Endereço de memória da pilha.
`int clearStack(Stack *stack)`: Limpa a pilha. Retorna -1 em caso de erro.
- Stack *stack: Endereço de memória da pilha.