Tag Archives: Arrays
Queues Using Arrays (Static) in C++
It does what it says. A first-in first-out structure, implement in the simplest possible way. Again, no bound checks. Sanitize your inputs please. #include <iostream.h> int *Queue, front, rear, maxSize; void createQueue(); void push(); void pop(); void dispQueue(); int main() { int choice; while(choice != 5) { cout<<"\n\n Enter your choice :" [...]
Posted in Code Archive
|
Also tagged Borland C++, C++, Code, Data Structures, Menu-Driven Program, Queue, Queues, Turbo C++
Stacks Using Arrays (Static) in C++
This is a general implementation of the stack data structure in C++. I’ve made it a ‘menu-driven’ program, for all you menu-loving whores. Nobody cares if it is rendered unreadable. Also, I’ve skipped bound checks in this program, so remember to sanitize your inputs or you may get sucked into a vortex. Also, since I’m [...]
Posted in Code Archive
|
Also tagged Borland C++, C++, Data Structures, Menu-Driven Program, Stacks, Turbo C++