This project demonstrates a visualization of a stack data structure using the OpenGL graphics library. Users can interact with the stack by pushing and popping elements, with the changes visually represented on the screen.
This project provides a graphical representation of a stack data structure. It showcases the basic operations of pushing and popping elements onto/from the stack, with visual feedback using the OpenGL library.
- Push elements onto the stack and visualize the changes.
- Pop elements from the stack and observe the visual updates.
- Clear instructions displayed for user interaction.
- Dynamic resizing of the stack based on user-defined size.
- Responsive GUI that updates in real-time.
- C++ compiler
- OpenGL library
- GLUT (OpenGL Utility Toolkit)
- Windows OS (for audio playback)
- Clone or download the repository to your local machine.
- Make sure you have the necessary libraries (OpenGL and GLUT) installed.
- Compile the project using a C++ compiler.
- Run the executable.
- Follow the on-screen instructions to interact with the stack visualization.
- Press 'i' or 'I' to push an element onto the stack.
- Press 'r' or 'R' to pop an element from the stack.
- Press 'q' or 'Q' to exit the program.
Contributions are welcome! If you have any suggestions or improvements, please create a pull request.