Stack Visualizer is an awesome concept which helps you to understand how stack data structure really works. It give a powerful impact to the beginner to understand it.
Before running the script you need to install and apply Graphics.h header file To Install Graphics.h in your IDE follow the below steps1: Download WinBGIM- http://winbgim.codecutter.org/
2: Extract the downloaded file. There will be three files:
- graphics.h
- winbgim.h
- libbgi.a
3: Copy and paste graphics.h and winbgim.h files into the include folder of compiler directory. (If you have Code::Blocks installed in C drive of your computer, go through: Disk C >> Program Files >> CodeBlocks >> MinGW >> include. Paste these two files there.)
4: Copy and paste libbgi.a to the lib folder of compiler directory
5: Open Code::Blocks. Go to Settings >> Compiler >> Linker settings
6: In that window, click the Add button under the “Link libraries” part, and browse
- Select the libbgi.a file copied to the lib folder in step 4.
7: In right part (ie. other linker options) paste commands
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
8: Try compiling a graphics.h program in C or C++, still there will be an error. To solve it, open graphics.h file (pasted in include folder in step 3) with Notepad++. Go to line number 302, and replace that line with this line : int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX
Note: Save the file in .cpp extension
Dowload the cpp file in your computer/pc and open it with C/C++ IDE after doing all the configuration told above