A full-featured C++ utility to convert text to Morse code and vice versa. Perfect for learning, amateur radio enthusiasts, and developers.
Author: Harsh Yadav
✅ Convert text to Morse code
✅ Convert Morse code back to text
✅ Interactive menu-driven interface
✅ File I/O support (load & save)
✅ Support for 40+ characters (letters, digits, punctuation)
✅ Word separation with /
✅ Efficient lookups with unordered_map
✅ Object-oriented design with MorseConverter class
Letters: A–Z (case-insensitive)
Digits: 0–9
Punctuation: . , ? : ; - / " ' ( ) = + $ _ @
Requires C++11 or later.
g++ -std=c++17 MorseCodeConverter.cpp -O2 -o morseRun interactively:
./morseMenu options:
- Convert text to Morse
- Convert Morse back to text
- Load from file
- Save to file
Input: HELLO WORLD
Output: .... . .-.. .-.. --- / .-- --- .-. .-.. -..
Input: .... . .-.. .-.. --- / .-- --- .-. .-.. -..
Output: HELLO WORLD
Morse-Code/
├── MorseCodeConverter.cpp # Main implementation
├── README.md # Documentation
├── LICENSE # Open source license
├── .gitignore # Git ignore rules
└── tests/ # Unit tests (future)
- Add unit tests with Google Test
- Support for prosigns (SOS, END, etc.)
- Audio output (play Morse sounds)
- GUI with Qt or wxWidgets
- Command-line argument support
- Performance benchmarks
- Documentation site
- Fork the repository
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit changes (
git commit -m 'Add YourFeature') - Push to branch (
git push origin feature/YourFeature) - Open a Pull Request
This project is licensed under the MIT License – see LICENSE file for details.
Made with ❤️ by Harsh Yadav