This project is a console-based Login and Registration System developed in C++ as part of the CodeAlpha C++ Programming Internship (Task 2).
The application allows users to securely register and log in using file handling techniques.
- To understand file handling in C++
- To implement a basic authentication system
- To work with loops, conditions, and functions
- To build a real-world console application
- User Registration
- User Login Authentication
- Duplicate Username Validation
- File Handling using
ifstreamandofstream - Menu-driven Interface
- Simple and Efficient Logic
- Language: C++
- Concepts: File Handling, Functions, Loops, Conditional Statements
- Compiler: GCC / MinGW / Any C++ Compiler
CodeAlpha_Login_System/ βββ main.cpp βββ users.txt βββ README.md
- Clone or download the repository
- Open the project in any C++ compiler
- Compile the code:
g++ login_registration.cpp -o login
- Run the program:
./login
===== MENU =====
1. Register
2. Login
3. Exit
Enter your choice: 1
Enter username: shubham
Enter password: 1234
Registration successful!
===== MENU =====
Enter your choice: 2
Enter username: shubham
Enter password: 1234
Login successful!
π§ͺ Sample Functionality
Register a new user with username and password
Login using stored credentials
Data is stored permanently using file handling
π Learning Outcomes
Practical understanding of file streams in C++
Implementation of authentication logic
Experience with real-world programming tasks
π€ Author
π·οΈ Internship
This project is submitted as Task 2 for the CodeAlpha C++ Programming Internship.
