Welcome to the C++ Mini Projects repository! This is a collection of beginner-to-intermediate console-based applications built using modern C++. These projects are designed to demonstrate core object-oriented programming (OOP) concepts, data handling, and clean control flow structures.
This repository contains three distinct mini-applications:
A simulated console banking application that mimics real-world banking operations.
- Key Features:
- Account creation with unique account numbers.
- Secure deposit and withdrawal functionalities (with balance checks).
- Balance inquiry and account detail display.
- Concepts Used: Classes and Objects
A robust command-line calculator capable of handling basic arithmetic and standard algebraic operations.
- Key Features:
- Basic operations: Addition, Subtraction, Multiplication, Division.
- Continuous execution loop until the user decides to exit.
- Division-by-zero error handling.
- Concepts Used: Functions,
switch-casecontrol blocks, Input validation.
A console-based, 24-hour format digital clock written in C++ that allows users to set a custom starting time. The application continuously updates and displays the time in real-time (HH:MM:SS) using an infinite loop, built-in time delays, and automated screen clearing for a realistic ticking effect.
- Key Features
- Custom Start Time: Prompts the user to input the initial hours, minutes, and seconds.
- Input Validation: Ensures the entered time conforms to realistic 24-hour constraints.
- Dynamic UI:* Implements custom console coloring and clear-screen commands to simulate a live digital display.
- Concepts Used: Functions, control blocks, Input validation, I/O Manipulation, System and Time Management(Sleep(); system(cls); system("color");)
An interactive digital menu calculator system.
- Key Features:
- Basic operations: Addition, Subtraction, Multiplication, Division.
It provides a secure and user-friendly interface for managing user accounts, handling authentication, and recovering lost credentials seamlessly.
- Key Features:
- User Registration: Allows new users to create an account by securely storing their credentials.
- User Login: Authenticates existing users by verifying their username and password against stored records.
- Password Recovery (Forgot Password): Enables users to recover or reset their password using a search mechanism.
- Graceful Exit: Provides a clean termination option from the main menu.
- Concepts Used: File Handling (fstream, ifstream), function, Control Flow & Structures
A lightweight, console-based utility to generate customizable, secure passwords based on user-defined lengths and character constraints.
- Key Features:
- Input: Enter the total password length, followed by the specific count of numbers and symbols you want.
- Output: Instantly generates an interleaved, unpredictable string mixing alphabets, numbers, and symbols.
- Concepts Used: Procedural Programming, Functions with Default Arguments (num=0, symb=0), Pseudo-Random Number Generation (srand(), rand(), time()), String Manipulation & Interleaving, Standard I/O Streams (cin, cout), Control Flow (while loops, if conditionals)
A lightweight console-based authentication system that allows users to securely register a new profile, log in using their credentials, and update their existing passwords. It handles real-time user validation by reading and writing profile data to a local storage file.
-
Key Features:
- User Registration: Dynamically creates unique user profiles with a username, password, and age.
- Secure Authentication: Validates login credentials against existing records before granting access.
- Profile Verification: Displays account details upon a successful login.
- Password Management: Allows users to safely change their password after verifying their old credentials.
- Persistent Storage: Keeps user data intact even after closing the program.
-
Concepts Used:
- File Handling (
ifstream,ofstream) - Object-Oriented Logic & Flow Control (
switch-case,do-whileloops) - Data Streams & Parsing (
std::string,cin/cout) - Conditional Validation
- File Handling (
To compile and run these projects, you need a C++ compiler installed on your system:
- Windows: MinGW, MSVC, or CLion
- macOS: Xcode Command Line Tools (
g++/clang) - Linux:
GCC(GNU Compiler Collection)
- Clone the repository:
git clone https://github.com/dk132006/cpp-mini-projects.git
cd cpp-mini-projects- Navigate to a specific project folder:
cd "Banking System"
- Compile the project:
Using
g++, run:
g++ main.cpp -o main
- Run the executable:
- On Windows:
main.exe - On Linux/macOS:
./main
- Object-Oriented Programming (OOP): Encapsulation, inheritance, and abstraction.
- Data Persistence: Using file streams to save application states.
- Robust Input Validation: Preventing infinite loops or crashes from invalid user inputs (e.g., entering text into a numerical menu field).
This project is licensed under the MIT License