A feature-rich console-based digital clock application that displays time in beautiful ASCII art format along with local weather information. The clock supports multiple time zones, 12/24-hour formats, and real-time weather updates.
- Beautiful ASCII Art Display: Time is displayed using custom-designed ASCII art characters
- Dual Time Format: Support for both 12-hour and 24-hour time formats
- Weather Integration: Real-time weather information for the specified location
- Time Zone Support: Ability to display time for different time zones
- Configurable Display: Option to show/hide seconds
- User Preferences: Saves user preferences for future sessions
- Date Display: Shows current date for the selected location
- Color Output: Uses ANSI colors for enhanced visibility
- C++ compiler with C++11 support
- Standard C++ libraries
- ANSI-compatible terminal
-
Clone the repository:
git clone https://github.com/alexbytesback/Digital-Clock-using-C-Plus-Plus cd Digital-Clock-using-C-Plus-Plus
-
Compile the project:
g++ -std=c++17 main.cpp Clock.cpp Display.cpp Input.cpp Utility.cpp -o DigitalClock
-
Run the compiled program:
./DigitalClock
-
Follow the prompts to:
- Enter your name
- Select your location
- Choose time format (12/24 hour)
- Toggle seconds display
main.cpp
: Entry point of the applicationClock.h/cpp
: Core clock functionality and main display loopDisplay.h/cpp
: ASCII art rendering and screen managementInput.h/cpp
: User input handling and validationUtility.h/cpp
: Helper functions for time zones and weather
- Large, clear ASCII art digits
- Blinking colon separator
- AM/PM indicator for 12-hour format
- Color-coded output for better visibility
- Weather information display
- Current date display
The application stores user preferences in clock_log.txt
, including:
- Username
- Preferred location
- Time format choice
- Seconds display preference
- Written in C++
- Uses ANSI escape sequences for terminal manipulation
- Custom ASCII art patterns for digits and symbols
- Real-time updates with 1-second refresh rate
- Efficient screen clearing and cursor positioning
- Time zone and weather data integration
Contributions are welcome! Please feel free to submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.