Hey everyone! This is a simple C++ console program I made that simulates how a browser handles history and the back button.
The cool part? It doesn't just print things on the screen, it actually opens real websites on your Windows desktop using system commands!
- It keeps track of websites using a simple array (stores up to 100 pages).
- Even if you press the back button and open a new page, it keeps your full continuous history log just like Google Chrome does.
- It also checks your URL input, so if you forget to type
https://, it automatically fixes it so the browser doesn't throw an error.
- Copy the code from
main.cppinto VS Code or Dev-C++. - Compile and run it (make sure you are on Windows).
- Choose options from the menu:
- Press 1 to open a new site (e.g., type
google.com). - Press 2 to go back.
- Press 3 to print your full history.
- Press 4 to exit.
- Press 1 to open a new site (e.g., type
Feel free to check out the code and let me know if you have any suggestions! THANK TOU!