A C++ console-based vending machine simulation created as a KUET practice/project.
The repository contains the full source code and a simple payment/history text file, along with compiled build artifacts.
This project is useful for practicing C++ fundamentals + menu-driven programming (inputs, conditions, functions/classes depending on implementation) in a small, real-world style problem.
2107017.cpp— main C++ source file for the vending machine program. :contentReference[oaicite:0]{index=0}Payment History.txt— a text file included for storing/keeping payment or transaction history records. :contentReference[oaicite:1]{index=1}2107017.exe,2107017.o— compiled output files (Windows executable + object file). :contentReference[oaicite:2]{index=2}
Tip: It’s usually better to compile from source (
.cpp) rather than committing.exe/.oin GitHub, but keeping them can be okay for quick demos.
A vending machine program typically provides:
- Product selection (from a set of items)
- Payment input (cash/amount entry simulation)
- Purchase confirmation (dispense item if paid enough)
- Optional change calculation
- Transaction/payment record keeping (often written to a text file)
This repo includes a Payment History file, which fits the “transaction log” concept. :contentReference[oaicite:3]{index=3}
- C++ compiler (GCC / MinGW / Clang)
- Runs as a console application
g++ 2107017.cpp -o vending
./vending