A polling system implemented in C++ where users can vote for their favorite cricketer from a predefined list of options. After voting, users can view the current poll results, which show the number of votes for each option and the corresponding percentages. The poll is active until a predefined expiration date, after which users can no longer vote.
- Users can vote for their favorite cricketer from a list of options.
- Voting is limited to one vote per user.
- Results are updated after each vote and displayed in percentage format.
- Poll expiration is set to a specific date.
- Colorful, professional, and user-friendly terminal interface.
- MS Dhoni - The legendary former captain of India.
- Virat Kohli - The modern-day cricketing icon.
- Rohit Sharma - The hitman of Indian cricket.
- Shikhar Dhawan - The dashing opener of India.
The poll expires on 2024-12-31. After this date, users will no longer be able to vote.
poll_results.txt
: Stores the vote counts for each option.users_voted.txt
: Keeps track of users who have already voted to prevent multiple votes from the same user.poll.cpp
: Main C++ program file that handles the polling logic.
- Ensure you have a C++ compiler installed (e.g., GCC or Clang).
- Clone or download the repository to your local machine.
- Clone The Repo:
git clone https://github.com/GET-UNKNOWN-ERR0R/online-polling-system.git
cd online-polling-system
- Run The Program:
g++ -o poll poll.cpp
./poll